Computer Science, asked by BrainlyHulk, 1 year ago

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 sonikaberi123p8qazk
4
this is the answer for a simple c code.
Attachments:

BrainlyHulk: Sorry !! But i asked for C++ !! C & C++ differs ...
BrainlyHulk: ^_^
sonikaberi123p8qazk: hey use a c to c++ converter command in linux
sonikaberi123p8qazk: its easy
Answered by siddhartharao77
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!

siddhartharao77: :-)
BrainlyHulk: thanks
siddhartharao77: Welcome!
Similar questions