Computer Science, asked by zainabj2986, 10 months ago

WAP in C++ to print your name,class,section and roll no. in alternate lines

Answers

Answered by mohammedsuleiman046
0

Answer:

Explanation:

#include<iostream.h>

void main()

{

int rollno;

char name[10];

char stream[20];

cout << "\nEnter rollno:";

cin >>rollno;

cout << "\nEnter name:";

cin >>name;

cout << "\n Your stream:";

cin >> stream;

cout<< "\nHere are the details you entered:";

cout << "\nRollno: " << rollno;

cout << "\nName: " << name;

cout << "\nStream: " << stream;

getch();

}

Output:

Your roll no: 777

Your name: Siddhartha

Your Stream: Computer Science

Here are the details you entered:

Rollno: 777

Name: Siddhartha

Stream: Computer Science.

Similar questions