rapandreifontaron
Enthusiast
Write a program that calculates and produce these two columns sequence number using the three looping statements :
sequence no.
1
2
3
4
5
squared
1
4
9
16
25
sequence no.
1
2
3
4
5
squared
1
4
9
16
25
san po ilalagay yang output pa code nga po yung buo baguhan lng po kaseint main()
{
int j; //define a loop variable
for(j=1; j<5; j++) //loop from 1 to 6,
cout << j * j << " "; //displaying the square of j
cout << endl;
return 0;
}
output
1
4
9
16
25
*****************************************************
try mo nga po yan..wala c++ pc ko weh
int number = 1;
while(number <= 5)
{
cout << number << endl;
number = number + 1;
}
output
1
2
3
4
5
**********************
try mo po..then edit mo na lang po
TheScript check mo nga kung tama :hilarious::hilarious:
may error mo 5 yung mga // ganyan yung nag error:dead:
lagay mo lang yung umpisa na
#include.iostream yata
#conio.h
yung ganyan..nalimutan ko na weh..try mo muna irun
