WRAV101: Practical 4
Submit in Moodle before Tuesday 22 March, 14:00
Objectives
Using loops
Using decision statements
Using build-in methods
NB: Check out the steps below regarding getting started, saving the program (after
Task 3
Write a program to display the squares of all the numbers 1 to 100 in a
table format similar to the output displayed.
You have to make use of a loop.
Here is program:
int main()
{
int x = 1;
for (int i = 0; x <= 100; i++)
{
cout << x * 2 << endl;
}
}
Comments
Leave a comment