Write a C program that asks the user to enter any integer gr
-Write a C program that asks the user to enter any integer greater than 0 and less than 100, print that integer, if the integer is out of the range, then give an error statement.
-Write a C program that that asks the user to enter any integer greater than 0 and less than 100, print that integer, if the integer is out of the range, then give an error statement. BUT give the user the option of continuing, rather than ending the program after the first echo.
-Write a C program that prompts the user to guess a value between 0 and 100. The program reports on wheter each guess is too high or too low and lets the user try again. This process continues until the right number is guessed. When the user gets the right number, the program reports how many guesses were required to get the number.
-Write a C program to convert a temperature in degrees Fahrenheit to degrees Celsius
Solution
1) #include<stdio.h>
main()
{ int x;
printf(\"enter an integer greater than 0 but less than 100\");
scanf(\"%d\",&x);
if(x<=100)
{ printf(\"%d\",x);
}
else
printf(\"error statement\");
}
2) #includ<stdio.h>
nclude<stdio.h>
main()
{ int x,i;
printf(\"enter an integer greater than 0 but less than 100\");
scanf(\"%d\",&x);
do
{ printf(\"%d\",x);
}
while(x<=100)
}
4) # include<stdio.h>
main()
{ float c,f;
printf(\"enter the temperature in degrees fahrenheit\");
scanf(\"%f\",&f);
c=(f-32)*5/9;
printf(\"%.2f fahrenheit=%.2f centigrade\" f,c);
}


