Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

input cpp

#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;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #input #cpp
ADD COMMENT
Topic
Name
9+8 =