cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
counter-controlled while loop
counter-controlled while loop
Jan 2, 2014 at 2:19am UTC
Jasis Sanqui
(5)
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
Jan 2, 2014 at 3:00am UTC
Jan 2, 2014 at 3:12am UTC
Hippogriff
(727)
Don't double post.
http://www.cplusplus.com/forum/beginner/121030/
Topic archived. No new replies allowed.