#include <stdio.h>
#include <stdlib.h>
int main()
{
int a = 7;
float b = 35.3;
char c = 'c';
char d[] = "chanpinxue.cn";
double e = 7.77;
printf("a=%d, f=%f, c=%c, d=%s, d=%lf \n", a, b, c, d, e);
switch(a)
{
case 1:
printf("a\n");
break;
case 7:
printf("b\n");
break;
default:
printf("default\n");
}
if (a == 7)
{
printf("a=7\n");
}
int i;
for(i = 1; i<5; i++) {
printf("i=%d\n", i);
}
//printf("Hello world!\n");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a = 7;
float b = 35.3;
char c = 'c';
char d[] = "chanpinxue.cn";
double e = 7.77;
printf("a=%d, f=%f, c=%c, d=%s, d=%lf \n", a, b, c, d, e);
switch(a)
{
case 1:
printf("a\n");
break;
case 7:
printf("b\n");
break;
default:
printf("default\n");
}
if (a == 7)
{
printf("a=7\n");
}
int i;
for(i = 1; i<5; i++) {
printf("i=%d\n", i);
}
//printf("Hello world!\n");
return 0;
}
#include <stdio.h> #include <stdlib.h> int main() { int a = 7; float b = 35.3; char c = 'c'; char d[] = "chanpinxue.cn"; double e = 7.77; printf("a=%d, f=%f, c=%c, d=%s, d=%lf \n", a, b, c, d, e); switch(a) { case 1: printf("a\n"); break; case 7: printf("b\n"); break; default: printf("default\n"); } if (a == 7) { printf("a=7\n"); } int i; for(i = 1; i<5; i++) { printf("i=%d\n", i); } //printf("Hello world!\n"); return 0; }