Using System;
Using System. Collections. Generic;
Using System. Linq;
Using System. Text;
Namespace if statement
{
Class Program
{
Static void Main (string [] args)
{
// If Michael's score is greater than 90, his father will reward him with 100 yuan.
Console. WriteLine ("Enter the score of Michael Jacob ");
Int cj = Convert. ToInt32 (Console. ReadLine ());
If (cj> 90)
{
/Console. WriteLine ("dad rewards 100 yuan ");
}
Else
{
Console. WriteLine ("let me write summary ");
}
Console. ReadKey ();
// 2 If Zhang San's Chinese score is greater than 90 and his music score is greater than 80, or his Chinese score is equal to 100 and his music score is greater than 70, the reward is 100 yuan.
Console. WriteLine ("Enter your Chinese score ");
Int chinese = Convert. ToInt32 (Console. ReadLine ());
Console. WriteLine ("Enter the music score of John ");
Int yinyue = Convert. ToInt32 (Console. ReadLine ());
Bool cj;
If (cj = chinese> 90 & yinyue> 80 | chinese ===100 & yinyue> 70)
{
Console. WriteLine ("dad rewards 100 yuan ");
}
Console. ReadKey ();
/// 3 pairs of final test scores (the user is required to enter a specific score of 0-, and the program displays a grade based on the score)
(Whether to use if or if-else)
Score> = 90
90> score> = 80 B
80> score> = 70 C
70> score> = 60 D
Score <60 E
Console. WriteLine ("enter a specific score ");
Int cj = Convert. ToInt32 (Console. ReadLine ());
If (cj> = 90)
{
Console. WriteLine ("");
}
If (cj <90 & cj> = 80)
{
Console. WriteLine ("B ");
}
If (cj <80 & cj> = 70)
{
Console. WriteLine ("C ");
}
If (cj <70 & cj> = 60)
{
Console. WriteLine ("D ");
}
If (cj <60)
{
Console. WriteLine ("E ");
}
Console. ReadKey ();
/// 4. the user is required to enter two numbers a and B. If a can be divisible by B or a plus B is greater than 100, a is output; otherwise, B is output.
Console. WriteLine ("enter a number ");
Int a = Convert. ToInt32 (Console. ReadLine ());
Console. WriteLine ("enter a number ");
Int B = Convert. ToInt32 (Console. ReadLine ());
If (a % B = 0 | a + B> 100)
{C
Console. WriteLine ("");
}
Else
{
Console. WriteLine ("B ");
}
Console. ReadKey ();
// 6. Ask the user to enter the user name and password. If the user name is admin and the password is mypass, the logon is successful.
Console. WriteLine ("enter the password :");
Int password = Convert. ToInt32 (Console. ReadLine ());
If (password = 888888)
{
Console. WriteLine ("correct ");
}
If (password! = 888888)
{
Console. WriteLine ("Enter again ");
}
If (password = 888888)
{
Console. WriteLine ("correct ");
}
Console. ReadKey ();
}
}
}