Computer Science, asked by msarita431, 2 months ago

write a program in c plus plus to print your name ,class and section.best answers will be marked as bbrainliest in HTML

Answers

Answered by profdambaldor
0

Answer:

#include <iostream>

using namespace std;

struct student

{

   char name[50];

   int class;

   char section[5];

};

int main()  

{

   student s;

   cout << "Enter information," << endl;

   cout << "Enter name: ";

   cin >> s.name;

   cout << "Enter class: ";

   cin >> s.class;

   cout << "Enter section: ";

   cin >> s.section;

   cout << "\nDisplaying Information," << endl;

   cout << "Name: " << s.name << endl;

   cout << "Roll: " << s.class << endl;

   cout << "Marks: " << s.section << endl;

   return 0;

}

Explanation:

Similar questions
Math, 1 month ago