- 2

help

int bacon = 0; (bacon <= 20) { cout << "bacon is " << bacon << endl; bacon = bacon + ; }

20th Apr 2018, 2:47 PM
Alcatraz Toney
Alcatraz Toney - avatar
5 Answers
+ 3
The problem is the line after the cout, bacon = bacon +; makes no sense do either: bacon += 1; or ++bacon; Also I just realised you don’t have the while keyword before (bacon <= 20) So the fixed code is: #include <iostream> using namespace std; int bacon = 0; while (bacon <= 20) { cout << "Bacon is " << bacon << endl; ++bacon; // or bacon += 1; }
20th Apr 2018, 2:52 PM
TurtleShell
TurtleShell - avatar
+ 1
int tocino = 0; (tocino <= 20) {cout << "tocino es" << tocino << endl; tocino = tocino + 2;
26th May 2021, 5:45 AM
Andres Charry
Andres Charry - avatar
0
thx
20th Apr 2018, 3:34 PM
Alcatraz Toney
Alcatraz Toney - avatar
0
men hsuni javobini topa olmayappan kim bilsa iltimos aytvorilar e
18th Dec 2020, 4:04 PM
Abduhalil
0
int bacon = 0; (bacon <= 20) { cout << "bacon is " << bacon << endl; bacon = bacon + ;
16th May 2021, 4:16 PM
Shivani
Shivani - avatar