counter-controlled while loop

hey guys help me please :)

The program should be print the numbers 0 through 10, along with their values doubled and tripled. The data file contains the necessary variable declarations and output statements.

Example the output:
Single Double Triple
1 2 3
2 4 6
3 6 9
4 8 12


here my code tell me if correct

#include <iostream>
#include <cstdlib>

using namespace std;

int main ()

{


int x, double, triple;
int x = 0
while (x<=10)

{
cout << "x" << double = (x*2) << triple = (x*3) << endl;
x++;
}
return EXIT_SUCCESS
Last edited on
Topic archived. No new replies allowed.