-
The procedure in C is as follows.
#include
int main()
int score;
printf("Please enter a grade");
scanf("%d",&score);
if(score>=90)
printf("Class A");
else if(score>=80)
printf("B-file");
else if(score>=70)
printf("C file");
else if(score>=60)
printf("D file");
else if(score<60)
printf("E file");
return 0;
Hope it helps.
Thank you. Look.
-
1. Use the lookup function, the result is simpler: =lookup(e2 (d2 2), 2. Use the if function, the formula is nested too much and redundant: =if(e2 (d2 2)>=28,"Obesity",if(e2/(d2^2)>=24,"Being overweight",if(e2/(d2^2)>=,"Normal weight","Low body weight")))
-
h3:=if(g3>=28,"Obesity",if(g3>=24,"Being overweight",if(g3>=,"Normal","Too low"Pull-down filling.
-
H2 Formula:
if(g2>=28,"Obesity",if(g2>=24,"Being overweight",if(g2>=,"Normal weight","Being underweight"Pull down.
-
1. Open our ** file with excel, and select the cell to enter the if function inside the cell.
2. Enter the first parameter of the function in parentheses around the if function.
3. After entering the first parameter, enter the second function and the third parameter of the function.
4. After entering the function, press the enter key to get the calculation result.
5. Select this cell and drag the left mouse button to calculate all the results.
-
if(logical_test,value_if_true,value_if_false):
Logical test represents any value or expression that evaluates to true or false. For example, a1 =400 is a logical expression that is true if the value in cell a10 is less than or equal to 400, otherwise it is the value returned when logical test is true. For example, if this parameter is a text string "Budgeted" and the Logical Test parameter value is true, the if function will display the text "Budgeted".
If logical test is true and value if true is empty, this parameter returns 0 (zero). If you want to display true, use a logical value for this parameter, which can also be a different formula.
value if false logical test is false. For example, if this parameter is a text string "Over budget" and the logical test parameter value is false, the if function will display the text "Over budget". If the logical test is false and the value if false is ignored (i.e., there is no comma after the value if true), the logical value false is returned.
If logical test is false and value if false is null (i.e., value if true is followed by a comma followed by a closing parenthesis), this parameter returns 0 (zero). value if false can also be some other formula.
The following is an example: if(400"=a1"=500,b1=12, you can leave it blank here, return false or 0).
-
Solve how profitable.
BAI is displayed with Excel's if function.
The steps for the values of the du interval are as follows:
1.Open **dao.
2.Select the H2 cell back and insert the countif function;
3.In the pop-up answer.
4.Select cell i2 and enter the formula: =countif(b2:h2,"<23")-countif(b2:h2,"<12"), click OK.
5.Select cell J2 and enter the formula: =CountIF(B2:H2,"<34")-countif(b2:h2,"<23"), click OK.
6.After the operation is completed, it can be seen that the H2-J2 cells display 3, 1, and 3 respectively, that is, the number of values in each interval. After the pull-down operation, the number of intervals can also be obtained for the second set of data.
This solves the problem of how to use the if function of excel to display the value of the interval.
-
if(and(a>3,b>5),9)
Syntax: if (logical test, value if true, value if false).
where logical test indicates that the calculation result is.
true or false.
value if true is the value returned when the internal logical test is true. Appearance.
value if false is the value returned when logical test is false.
Function usage: if (condition, the value returned when the condition is true, and the value returned when the condition is false).
if(a2>20,"Done","Not finished")
The formula in B2 means that the "Completion" in A2 is not greater than 20, i.e., "the condition is false", so it returns "Incomplete"; In the formula of B4, because the "Completion" in A4 is greater than 20, that is, "the condition is true", it returns "Complete".
-
and function or *.
if(and(a1>0,b1>0),…or =if((a1>0)*(b1>0),...or =if(and(a1:b1>0),...Finally, press Ctrl+Shift+Enter to finish.
-
=if(and(a1>3,b1>5),9,0)
In this way, it is represented by the and function and the or function is represented by the or.
-
When there are multiple conditions, it is necessary to add self-entry logic judgment functions: and(), or(), baixor(), etc. to assist DU judgment avoidance.
Avoid more zhiif() nesting. If you want DAO to satisfy "h=9 when a is greater than 3 and b is greater than 5" at the same time, you can use the and() function (return true only when all conditions are true, otherwise false, and the expressions are separated by ","), the formula for h1:
= if(and(a1>3,b1>5),9,"")
Formula description: When the condition "and(a1>3,b1>5)" is true, the result is "9", otherwise the result is "". In "and(a1>3,b1>5)" only if both conditions are met (true-true), the result will be "9", and as long as one of them is not satisfied, then "".
Benefits of using logical functions:
Clearer processing logic.
Avoid nesting a lot of if() functions, which will make people frustrated and not easy to know the logic of data processing, h1 formula:
if(a1>3,if(b1>5,9,""),"")
This is how nesting is written, and the result is the same, but too many if() functions are used for nesting, and it is easy for those who write to make mistakes, and it is not easy for those who read it to understand.
-
If there are only these two data, use :=if(a2="Orientation",12,0)
If there is any other data, you need to use the nested formula: =if(a2="Orientation",12,if(a2="Omnidirectional",0,""))
-
Enter the formula =if(a2=) in cell b2"Orientation",12,0)
-
The specific input format of the if function is as follows:
if(logical_test,value_if_true,value_if_false)
Logical test represents a logical expression, which can be true or false or something else.
For example, if the logical expression a10=100 is equal to 100 in cell a10, the expression is true, otherwise it is false.
value if true The value returned when logical test is true.
For example, if this parameter is a text string "Budgeted" and the Logical Test parameter value is true, the if function will display the text "Budgeted". If logical test is true and value if true is empty, this parameter returns 0 (zero).
value if false logical test is false.
If this parameter is a text string "Over budget" and the value of the logical test parameter is false, the if function will display the text "Over budget". If the logical test is false and the value if false is ignored (i.e., there is no comma after the value if true), the logical value false is returned.
-
Excel if function usage.
1 The syntactic structure of the if function.
The syntactic structure of the if function: if(condition, result 1, result 2).
2 Functions of the if function.
The data that satisfies the conditions is processed, and the output result is 1 if the conditions are satisfied, and the output result 2 is output if the conditions are not satisfied. Outcome 1 or Outcome 2 can be omitted, but not both.
3 Conditional Expressions.
Conditional expressions are formed by connecting two expressions with relational operators (mainly =, <>=, <=, and other 6 relational operators).
Here's a simple example:
if(a1=100,1,0)
This means that when a1=100, 1 is returned, otherwise 0 is returned.
4. The execution process of nesting the if function.
If you want to judge a variable by rank, the if function looks like this:
if(c1>60,if(and(c1>90),"Excellent","Eligible"),"Unqualified")
The syntax explanation of the above if statement: if the value of cell c1 is greater than 60, then execute the second parameter, here is the nested function, continue to judge whether the value of cell c1 is greater than 90 (in order to let you experience the application of the and function, write it as and(c1>90), in fact, you can only write c1>90), if you meet the requirements to display excellent words in cell c2, do not meet the display of qualified words, if the value of c1 is not met with the above conditions, Then the third parameter is executed, that is, the word unqualified is displayed in cell C2.
Here are some examples of the if function in Excel.
If the score is greater than 60 points, it will be considered a pass, otherwise it will be a failure. The formula is as follows:
if(a1>=60,"Pass","Fail")
Statement explanation: If the value of cell A1 is greater than or equal to 60, then execute the second parameter, that is, display the passing word in cell B2, otherwise execute the third parameter, that is, display the word "unqualified" in cell B2.
In Excel, if a1=b1=c1, 1 is displayed in d1 and 0 is returned if it is not equal
In d1, enter the following function:
if(and(a1=b1,a1=c1),1,0)
The excel function returns different values when the values of a column are in different intervals.
For example, if the value in column A is greater than 0 or less than or equal to 10, it returns 1, if it is greater than 10 and less than 100, it returns 2, and if it is greater than or equal to 100 and less than 200, it returns 3, otherwise it is a space.
Method: Enter the following function in cell A1 and copy it to other cells:
if(and(a1>0,a1<=10),1,if(and(a1>10,a1<100),2,if(and(a1>=100,a1<200),3,"")))
Point directly like this: sumif(conditional cell range, conditional, cell range that needs to be calculated). >>>More
Start the excel program with the frequency function, click "File" - "Open", click "Formula" - "Other Functions" - "Statistics" - "Frequency" to set the function. Here's how: >>>More
Since you want to make the number different every day, and you want to distribute the total amount you get unevenly, you can use the method of random numbering. >>>More
Method steps.
Open the excel document, click "Insert" in the menu bar, select "Function", and click. >>>More
The scroll-down menu has a multi-screen interaction.