Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ input

#include <iostream>
using namespace std;

int main() {
 	int n1, n2;
  	float f1;
  	char c1;
    
    cout<<"Enter two integers, a float and a char: ";
    cin>>n1>>n2>>f1>>c1;	//multiple input in single line
    
    cout<<"Check: "<<n1<<n2<<f1<<c1<<endl;
	return 0;
}
 
PREVIOUS NEXT
Tagged: #input
ADD COMMENT
Topic
Name
4+6 =