Answer the question
In order to leave comments, you need to log in
How to make letters to be entered in c++?
#include <iostream>
using namespace std;
int main()
{
setlocale(0, "");
double num;
cout << "Ïðèâåò: ";
cin >> num;
if (num == 0) { // Если введенное число меньше 10.
cout << "Как тебя зовут?" << endl;
} else {
cout << "пока" << endl;
}
setlocale(0, "");
int b;
cout << "Нажми 1 чтобы я закрылся";
cin >> b;
cout << b << endl;
return 0;
}
Answer the question
In order to leave comments, you need to log in
Read carefully what kind of error, think a lot, read about data types "string" and methods of working with them. Google strcmp for a hint.
Is this about age? Then why type double? An unsigned short int would do here . And why are there two setlocales in the program?
double num;
cout << "Ïðèâåò: ";
cin >> num;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question