Write a program to print your Roll No. , Name, Your stream ( Subjects taken in class 11 ) in one line and two more lines.
♦ C++ || Computer
♦ Class 11 CBSE
Answers
Answered by
4
this is the answer for a simple c code.
Attachments:
BrainlyHulk:
Sorry !! But i asked for C++ !! C & C++ differs ...
Answered by
7
#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.
Hope this helps!
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.
Hope this helps!
Similar questions