Classified in Computers

Written at on English with a size of 4.14 KB.

Write a program to convert a Numerical grade to text:

0.0 ≤ X < 5.0              è Fail

5.0 ≤ X < 7.0              è Pass

7.0 ≤ X < 9.0              è Good                    

9.0 ≤ X < 10.0            è Excellent              

X=10.0                       è With Honors

Check that the grade is valid, and If not, print a message that explains the error and finishes the program.

Write a C program to

 accept the Coordinates (X, Y) of a point and determine in which quadrant the point lies.


int main()


float x, y;

printf("enter the coordinate x\n" );


printf("enter the coordinate y\n" );


if(x>0 && y>0)

printf("first quadrant \n");

if(x<0 && y>0)

printf("second quadrant \n");

if(x<0 && y<0)

printf("third quadrant \n");

if(x>0 && y<0)

printf("fourth quadrant \n");

if(x==0 && y==0)

printf("center \n");


Write a Program to print a table of Fahrenheit temperatures and their centigrade or Celsius equivalents (from 0°C to 100°C step 5).


int main()


float C=0.0, F=0.0;    

printf("table from Fahrenheit to Celsius \n");

for (C>=0;C<=100;C=C+5){


printf(" The value %g in Celsius corresponds to%g in Fahrenheit \n", C,F);



Entradas relacionadas: