Posts

Showing posts from March 24, 2019

Examples for Mid

C++ "Hello, World!" Program C++ Program to Print Number Entered by User C++ Program to Add Two Numbers C++ Program to Find Quotient and Remainder C++ Program to Find Size of int, float, double and char in Your System C++ Program to Swap Two Numbers C++ Program to Check Whether Number is Even or Odd C++ Program to Check Whether a character is Vowel or Consonant. C++ Program to Find Largest Number Among Three Numbers C++ Program to Find All Roots of a Quadratic Equation C++ Program to Calculate Sum of Natural Numbers C++ Program to Check Leap Year C++ Program to Find Factorial C++ Program to Generate Multiplication Table C++ Program to Display Fibonacci Series C++ Program to Find GCD C++ Program to Find LCM C++ Program to Reverse a Number

CUST Assignment

Image
Program #1 #include<iostream> #include<windows.h> using namespace std; class student{ public: char FirstName[30],LastName[30],SC[20],grade; int RollNo,marks; void CALCULATE_GRADE(){ if(marks>=80) grade='A'; else if(marks>=65&&marks<80) grade='B'; else if(marks>=50&&marks<65) grade='C'; else if(marks>=40&&marks<50) grade='D'; else if(marks<40) grade='F'; } void Display(){ cout<<" First Name:"<<FirstName<<endl;      cout<<" Last Name:"<<LastName<<endl;      cout<<" Roll #:"<<RollNo<<endl;      cout<<" Section:"<<SC<<endl;      cout<<" Marks:"<<marks<<endl;         cout<<" Grade:"<<grade<<endl; } }; int main(