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

Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

2653


What are # preprocessor operator in c?

632


What are formal parameters?

663


What are the 4 types of programming language?

584


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

670






Is that possible to store 32768 in an int data type variable?

693


How can you allocate arrays or structures bigger than 64K?

684


What is a pointer value and address in c?

636


Difference between strcpy() and memcpy() function?

681


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

670


What are the 5 types of inheritance in c ++?

587


Can we declare variable anywhere in c?

538


What is default value of global variable in c?

564


Why header files are used?

646


What is call by value in c?

559