- 2
help
int bacon = 0; (bacon <= 20) { cout << "bacon is " << bacon << endl; bacon = bacon + ; }
5 ответов
+ 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;
}
+ 1
int tocino = 0; (tocino <= 20) {cout << "tocino es" << tocino << endl; tocino = tocino + 2;
0
thx
0
men hsuni javobini topa olmayappan kim bilsa iltimos aytvorilar e
0
int bacon = 0;
(bacon <= 20) {
cout << "bacon is " << bacon << endl;
bacon = bacon +
;