0

Can someone help me make this work pls??. Thanks!

I would need an answer for all 3 integers.

11th Jan 2017, 2:00 PM
Dan Hernandez
Dan Hernandez - avatar
9 Antworten
0
#include <iostream> using namespace std; int main() { int a = 0; int b = 0; int c; while(a<3){ b = b+5; a++;} return 0; }
11th Jan 2017, 2:14 PM
Dan Hernandez
Dan Hernandez - avatar
0
lol of course
11th Jan 2017, 2:14 PM
Dan Hernandez
Dan Hernandez - avatar
0
@caleb. well that was the question. to find the proper answer for a,b,c. and when I write cout for all of them I get some type of answer. I just want to know if someone knows a different way to get an answer . this is how I tried to solve it. #include <iostream> using namespace std; int main() { int a = 0; int b = 0; int c; while(i<3){ x = x+5; i++;} cout << a << endl; cout << b << endl; cout << c << endl; return 0; }
11th Jan 2017, 2:24 PM
Dan Hernandez
Dan Hernandez - avatar
0
I'm just testing things. I had originally write them with i and x and i forgot to change them to abc . 2686816 is also what I get. so, that result would be correct? (I corrected the code)
11th Jan 2017, 2:35 PM
Dan Hernandez
Dan Hernandez - avatar
0
thanks will do!
11th Jan 2017, 2:40 PM
Dan Hernandez
Dan Hernandez - avatar