Question #257972

Write a C++ program to illustrates how to read strings and numeric data


Expert's answer

#include <iostream>

int main() {
 std::string str;
 int num;
 // read a string 
 std::cin >> str;
 // read a numberic data
 std::cin >> num;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS