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
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.
What are # preprocessor operator in c?
What are formal parameters?
What are the 4 types of programming language?
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
Is that possible to store 32768 in an int data type variable?
How can you allocate arrays or structures bigger than 64K?
What is a pointer value and address in c?
Difference between strcpy() and memcpy() function?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
What are the 5 types of inheritance in c ++?
Can we declare variable anywhere in c?
What is default value of global variable in c?
Why header files are used?
What is call by value in c?