How do i implement the if statement to print nothing ? | SoloLearn: Learn to code for FREE!

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; }

c++

1/23/2021 6:07:37 PM

Кирилл Чернятин

2 Answers

New Answer

+5

Кирилл Чернятин Required RAM is fixed so here should be Требуемая оперативная память исправлена, поэтому здесь должно быть if (ram < 16) { cout << "PC upgrade needed"; }

+4

Thank you for information ! Have a great day fantastic luck , wherever & whenever you are ! :).