For a student of CS102, take his Quiz #1 marks (out of 5) as input and convert it into percentage marks.
Code:
#include<stdio.h>
main ()
{
float marks;
float score;
printf("enter your quiz marks out of 5:");
scanf("%f",&marks);
score=(marks*100)/5;
printf("your percentage is:%.1f",score);
return 0;
}
Program Output:
For more problems click here
No comments:
Post a Comment