View Single Post
Old 09-11-2006, 09:14 AM   #11
LSDDSL

Join Date
Oct 2005
Posts
619
Senior Member
Default
ah **** guys one more questions

i have to do this: 4- Write a program in C that has the following output:
Please make a choice:
1-grade calculation
2-end
Sample Input 1
Please input your first grade: 76
Please input your second grade: 84
Please input your third grade: 92
The average of your grades is: 84.0
This corresponds to a grade of: B
Do more calculations?(Y or N)
Sample Input: N
Good By


so far i have

void main()
{
int a,b,c,d,h,z,y;
while(a!=2){
printf("Please make a choice\n");
printf("1-Grade Calculation\n");
printf("2-END\n");
scanf("%d", &a);
if (a==1){ printf("Please enter your first grade:");
scanf("%d", &b);
printf("\n");
printf("Please enter your second grade:");
scanf("%d", &c);
printf("\n");
printf("Please enter your third grade:");
scanf("%d", &d);
printf("The average is:");
h=(b+c+d)/3;
printf("%d", h);
printf("\n");
if(h>=90 && h=80 && h=70 && h=60 && h
LSDDSL is offline


 

All times are GMT +1. The time now is 07:35 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Design & Developed by Amodity.com
Copyright© Amodity