Write a complete program to allow the following data processing:
i. Declare the variables (name, program code, part, CGPA).
ii. Ask the user the data of name, program code, part, and CGPA.
iii. Display the data in a proper format.
#include <iostream>
using namespace std;
int main() {
char name[50];
int program_code,cgpa,part;
cout << "Please enter your name: ";
cin >> name;
cout << "enter your program code:";
cin>>program_code;
cout << "enter your part:";
cin >> part;
cout << "enter your cgpa:";
cin>> cgpa;
cout << "Your name is: " << name << endl;
cout << "Your Program code is: " << program_code << endl;
cout << "Your part is: " << part << endl;
cout << "Your is: " << name << endl;
}
Comments
Leave a comment