当前位置:网站首页>C # exchange number, judge to pass the exam
C # exchange number, judge to pass the exam
2022-07-07 23:33:00 【Bobo in summer】
static void Swap( ref int x, ref int y)
{
int temp;
temp = x;
x = y;
y = temp;
}
int m = 2, n = 3;
Console.WriteLine(" Exchange before , Two Numbers {0} and {1}",m,n);
Swap(ref m,ref n);
Console.WriteLine(" After exchanging , Two Numbers {0} and {1}", m,n);
Console.ReadKey();

class Student
{
public string name;
int Score;
public int Score1
{
get {
return Score; }
set {
Score = value;
if (value >= 0 && value <= 100)
{
Score = value;
}
else
Score = -1;
}
}
}
Student stu = new Student();
Console.WriteLine(" Please enter your name ");
stu.name = Console.ReadLine();
Console.WriteLine(" Please enter your score ");
stu.Score1 = int.Parse(Console.ReadLine());
if (stu.Score1 == -1)
{
Console.WriteLine(" data is invalid ");
}
else
{
if (stu.Score1 >= 60 && stu.Score1 <= 100)
{
Console.WriteLine(" You have passed the exam ");
}
else if (stu.Score1 <= 60)
{
Console.WriteLine(" Failed the exam ");
}
}
Console.ReadKey();

边栏推荐
- Unity3d learning notes 4 - create mesh advanced interface
- USB (XVII) 2022-04-15
- LDO voltage stabilizing chip - internal block diagram and selection parameters
- 移动端异构运算技术 - GPU OpenCL 编程(基础篇)
- The efficient s2b2c e-commerce system helps electronic material enterprises improve their adaptability in this way
- MATLAB signal processing [Q & A essays · 2]
- 产业共融新势能,城链科技数字峰会厦门站成功举办
- USB (XVIII) 2022-04-17
- 2022 certified surveyors are still at a loss when preparing for the exam? Teach you how to take the exam hand in hand?
- Solve the problem of duplicate request resource paths /o2o/shopadmin/o2o/shopadmin/getproductbyid
猜你喜欢

Home appliance industry channel business collaboration system solution: help home appliance enterprises quickly realize the Internet of channels

Installing spss25

Lm12 rolling heikin Ashi double K-line filter

Mobile heterogeneous computing technology - GPU OpenCL programming (basic)

Live-Server使用
![[STM32 + esp-12s connect Tencent cloud IOT development platform 1] creation of cloud platform and burning of at firmware](/img/bc/8241a339cca9b7af475169dba39c10.jpg)
[STM32 + esp-12s connect Tencent cloud IOT development platform 1] creation of cloud platform and burning of at firmware

2022 certified surveyors are still at a loss when preparing for the exam? Teach you how to take the exam hand in hand?

leetcode-520. Detect capital letters -js

Puce à tension stabilisée LDO - schéma de bloc interne et paramètres de sélection du modèle

建筑建材行业SRM供应商云协同管理平台解决方案,实现业务应用可扩展可配置
随机推荐
电子设备行业智能供应链协同平台解决方案:解决低效, 赋能产业数字化升级
FreeLink开源呼叫中心设计思想
Oracle database backup and recovery
[compilation principle] lexical analysis design and Implementation
windows设置redis开启自动启动
Caip2021 preliminary VP
Count the top 10 films at the box office and save them in another file
How to login and enable synchronization function in Google browser
Live server usage
In the field of software engineering, we have been doing scientific research for ten years!
系统设计概述
B_QuRT_User_Guide(40)
SAP 内存参数调优过程
Map operation execution process
PHP uses Alibaba cloud storage
S2b2b mall solution of intelligent supply chain in packaging industry: opening up a new ecosystem of e-commerce consumption
js 获取对象的key和value
Force deduction solution summary 648 word replacement
2022 Season 6 perfect children's model Shaanxi finals came to a successful conclusion
经纬度PLT文件格式说明