Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ program to take input from user

/*Q: Write a program that ask the user to enter the roll 
number, section, CGPA and print the formatted output 
on the screen?*/
#include<iostream>
using namespace std;
int main()
{
	int a;
	char b;
	float c;
	cout<<"Roll Number:"<<a;
	cin>>a;
	cout<<"Section	 :"<<b;
	cin>>b;
	cout<<"CGPA	 :"<<c;
	cin>>c;
return 0;
}
 
PREVIOUS NEXT
Tagged: #program #input #user
ADD COMMENT
Topic
Name
8+4 =