Commit 61865025 by muhega

Upload New File

parent 61f86a72
Showing with 36 additions and 0 deletions
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x,i=1;
printf("what is the distance between moon and earth in KM?\n");
while(i>0)
{
scanf("%d",&x);
if (x==0)
{
i=0;
printf("someone needs to go to school!! \n");
}
else if (x==384400)
{
i=0;
printf("correct answer \n");
}
else if (x>=365180 && x<=403620)
{
i=0;
printf("close enough, YOU SHALL PASS! \n");
}
else
{
printf("wrong answer! try again \n");
}
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment