Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200?

Answer Posted / rohit

#include<stdio.h>
#include<conio.h>
struct mix
{
int rollno,m1,m2,m3,total;
char cn;
};
void main()
{
mix s1;
printf("Enter roll no:");
scanf("%d",&s1.rollno);
printf("Enter course name:");
scanf("%s",s1.cn);
printf("Enter marks of 3 subjects out of 150:");
scanf("%d%d%d",&s1.m1,&s1.m2,&s1.m3);
s1.total=s1.m1+s1.m2+s1.m3;
if(s1.total>200)
{
printf("A grade");
}
getch();
}

Is This Answer Correct ?    23 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I get a null pointer in my programs?

1116


What are runtime error?

1136


Can we change the value of constant variable in c?

1063


Explain main function in c?

1086


What is structure and union in c?

1154


The statement, int(*x[]) () what does in indicate?

1151


What is s or c?

1066


What are nested functions in c?

1026


Explain the use of keyword 'register' with respect to variables.

1056


What is the basic structure of c?

1086


How do I copy files?

1062


What tq means in chat?

1126


Who developed c language and when?

1071


How was c created?

1069


How can I write a function that takes a format string and a variable number of arguments?

1060