Created
March 20, 2011 16:21
-
-
Save PlloYNiiE/878424 to your computer and use it in GitHub Desktop.
while.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //#include <stdio.h> | |
| int main() { | |
| int test=950; | |
| float number[10]={12,334,1,2,3,4,5,6,7,8}; | |
| int i; | |
| float A=1.1; | |
| int B = 3.1; | |
| char ch1 = 'E'; | |
| char ch2; | |
| float min = number[0]; | |
| float ck[10] = { 4 }; | |
| float fk[10]; | |
| float average = number[0]; | |
| i = 2222; | |
| for(i=0;i<10;i+=2) | |
| { | |
| if (number[i] < min) | |
| min = number[i]; | |
| } | |
| float sum = 0; | |
| for (i=10; i>0; --i) | |
| { | |
| sum+=number[i]; | |
| } | |
| while (i<=0) | |
| { | |
| if (i==1) | |
| { | |
| // printf("I MOD 2\n"); | |
| } | |
| else | |
| { | |
| printf("else"); | |
| } | |
| i+=2; | |
| i++; | |
| } | |
| char c = 'A'; | |
| switch( c+2 ) | |
| { | |
| case 'A': | |
| break; | |
| case 'a': | |
| break; | |
| default : | |
| printf("FCK"); | |
| } | |
| if (i>0) | |
| { | |
| printf("I > 0"); | |
| } | |
| average = sum/10; | |
| printf("min = %f\n", min); | |
| printf("average = %0.2f\n", average); | |
| return 0; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment