#include<stdio.h>
int main(){printf("hello world!");return 0;
}
#include<stdio.h>
int main(){int a,b,sum,quotient;printf("Enter two numbers:");scanf("%d %d",&a,&b);sum = a + b;quotient = a / b;printf("%d + %d = %d\n",a,b,sum);if(b != 0){printf("%d / %d = %d",a,b,quotient);}else{printf("请检查你输入的数字是否正确。");}return 0;
}
#include<stdio.h>
int main(){int number;printf("Enter a number:");scanf("%d",&number);if(number%2 == 0){printf("%d is even",number);}else{printf("%d is odd",number);}return 0;
}
#include<stdio.h>
int main(){int year;printf("Enter a year:");scanf("%d",&year);if(year % 4 == 0 & year % 100 != 0 | year % 400 == 0){printf("%d is a leap year",year);}else{printf("%d is not a leap year",year);}
}
#include<stdio.h>
int main(){int n,i;int t = 1;printf("Enter a number:");scanf("%d",&n);for(i = 1;i <= n;i++){t = t * i;}printf("factorial = %d",t);return 0;
}