+ 1

How can i make some objective type program in c++

Q.what is your name? 1.shan. 2. tanu

31st Jul 2017, 1:12 AM
Shantanu Mishra
Shantanu Mishra - avatar
3 odpowiedzi
+ 8
int input; std::cout << "Q. What is your name?\n"; std::cout << "1. shan\n"; std::cout << "2. tanu\n"; std::cin >> input; std::cin.clear(); std::cin.ignore(512, '\n'); switch(input) { case 1: //do something case 2: //do something default: //invalid choice msg }
31st Jul 2017, 4:29 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
using String
31st Jul 2017, 1:27 AM
Irwin Lopez
Irwin Lopez - avatar
+ 1
hi
3rd Aug 2017, 7:55 AM
محمد نافذ
محمد نافذ - avatar