Open findddout opened 2 months ago
int main(void)
{
int x,y;
int z;
printf("Please enter two numbers");
scanf("%d,%d",&x,&y);
z = x % y;
printf("The rimainder is:%d\n",z);
return 0;
}
int main(void)
{
int x;
printf("Please enter a number");
scanf("%d",&x);
if(x >= 0 && x < 100)
{
printf("positive\n");
}
else if(x <= 0 && x > -100)
{
printf("negative\n");
}
return 0;
}
int main(void) { int x; int y; int z; int d;
printf("please enter 3 numbers\n");
scanf("%d %d %d", &x,&y,&z);
// Minimum
if(x < y && x < z){
printf("The minimum number is:%d\n");
}
else if(y < x && y < z){
printf("The minimum number is:%d\n");
}
else if(z < x && z < y){
printf("The minimum number is:%d\n");
}
else if(y == x && z == y){
printf("The minimum number is ALL:");
}
return 0;
}
int main(void) { int x,y,i;
printf("please enter a numnber\n");
scanf("%d",&x);
y = 1;
for(i = 1; i <= x; i++)
{
printf("%d\n",i);
printf("--%d = %di * %dy\n", i*y,i,y);
y = i*y;
}
return 0;
}
int main(void) { int x; int y; int z; int d;
printf("please enter 3 numbers\n");
scanf("%d %d %d", &x,&y,&z);
// Minimum
if(x < y && x < z){
printf("%d is minimum",x);
}
else if(y < x && y < z){
printf("%d is minimum",y);
}
else if(z < x && z < y){
printf("%d is minimum",z);
}
else if(z == x && y == z){
printf("%dThese 3 numbers are same size",x);
}
//Maximum
if(x > y && x > z){
printf("%d is maximum",x);
}
else if(y > x && y > z){
printf("%d is maximum",y);
}
else if(z > x && z > y){
printf("%d is maximum",z);
}
return 0;
}
int main(void){ printf("Hello YUHO!\n"); return 0; }
int main(void)
{
int x;
int y;
printf("Please enter a number");
scanf("%d",&x);
if(x % 2 == 0){
printf("This is even\n");
}
else{
printf("This is odd\n");
}
return 0;
}
int main(void)
{
int x;
int num1;
int num2;
int num3;
int num4;
printf("Please enter four numbers\n");
scanf("%d",&x);
num1 = x / 1000;
num2 = x % 1000 / 100;
num3 = x % 1000 % 100 / 10;
num4 = x % 1000 % 100 % 10 / 1;
x = num1 + num2 + num3 + num4;
printf("The answer is:%d\n",x);
return 0;
}
int main(void) { int x; int y; int z;
printf("Please enter two numbers:");
scanf("%d,%d",&x,&y);
z = x / y;
printf("The answer is:%d",z);
return 0;
}
int main(void)
{
int x;
printf("Please enter a number");
scanf("%d",&x);
if(x >= 0 && x < 59)
{
printf("F\n");
}
else if(x >= 60 && x < 69)
{
printf("C\n");
}
else if(x >= 70 && x < 79)
{
printf("B\n");
}
else if(x >= 80 && x < 89)
{
printf("A\n");
}
else if(x >= 90 && x < 99)
{
printf("A+\n");
}
return 0;
}
int main(void)
{
char x,y,z,w;
printf("Please enter a number");
scanf("%c,%c,%c,%c",&x,&y,&z,&w);
if (x == '0'){
printf("0000\n");
}
else if (x == '1'){
printf("0001\n");
}
else if (x == '2'){
printf("0010\n");
}
else if (x == '3'){
printf("0011\n");
}
else if (x == '4'){
printf("0100\n");
}
else if (x == '5'){
printf("0101\n");
}
else if (x == '6'){
printf("0110\n");
}
else if (x == '7'){
printf("0111\n");
}
else if (x == '8'){
printf("1000\n");
}
else if (x == '9'){
printf("1001\n");
}
else if (x == 'A'){
printf("1010\n");
}
else if (x == 'B'){
printf("1011\n");
}
else if (x == 'C'){
printf("1100\n");
}
else if (x == 'D'){
printf("1101\n");
}
else if (x == 'E'){
printf("1110\n");
}
else if (x == 'F'){
printf("1111\n");
}
return 0;
}
include
int main(void) { int i; int x; int y[20]; int z; int j;
}