WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200?
Answers were Sorted based on User's Feedback
Answer / 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 |
two variables are added answer is stored on not for third variable how it is possible?
What is build process in c?
Explain the difference between malloc() and calloc() function?
Explain how does flowchart help in writing a program?
how to calculate the time complexity of a given algorithm? pls give exaples..mainly for the coplexities such as O(log n),O(n log n)...
How is a pointer variable declared?
Explain about the functions strcat() and strcmp()?
how to make program without <> in library.
how to find that no is int or float?
Can true be a variable name in c?
What is the difference between class and object in c?
how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......