0

How do i implement the if statement to print nothing ?

I'm working on a task and it has this requirement : "Don’t print anything if the RAM volume requirement is satisfied." I do not understand how to write it in. Original : int main() { int ram; cin >> ram; // место для вашего кода return 0; } My code : int main() { int ram; cin >> ram; int requiredRAM; cin >> requiredRAM; // место для вашего кода if (ram > requiredRAM){ cout << "PC upgrade needed"; } return 0; }

23rd Jan 2021, 6:07 PM
Kirill Chernyatin
Kirill Chernyatin - avatar
2 odpowiedzi
+ 5
Кирилл Чернятин Required RAM is fixed so here should be Требуемая оперативная память исправлена, поэтому здесь должно быть if (ram < 16) { cout << "PC upgrade needed"; }
23rd Jan 2021, 6:30 PM
A͢J
A͢J - avatar
+ 4
Thank you for information ! Have a great day fantastic luck , wherever & whenever you are ! :).
23rd Jan 2021, 6:33 PM
Kirill Chernyatin
Kirill Chernyatin - avatar