How to write a program using decision making statements? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How to write a program using decision making statements?

3rd Jan 2017, 2:14 PM
Faheem baloch
Faheem baloch - avatar
3 ответов
+ 8
#include <iostream> using namespace std; int main () { float cookies; cout << "Please input the amount of cookies you have : "; cin >> cookies; if (cookies > 100) { cout << "You have less than " << cookies + 1 << " cookies! But that is quite an amount!" << endl; } else if (cookies <= 100) { cout << "Too little cookies! " << endl; } return 0; }
11th Jan 2017, 10:05 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
Coookieees
11th Jan 2017, 10:42 AM
Filip
Filip - avatar
0
int x = 5; ( x == 5 ) { System. out .println("Yeah"); }
10th Sep 2022, 1:52 PM
vishnu