Screenshootnya :
Listing programnya :
#include <stdio.h>
#include <conio.h>
#include <iostream.h>
void main()
{
int a,b;
int hasil =0;
clrscr();
for (a=1;a<=5;a++)
{
for (b=1; b<=a;b++)
{
cout<<b;
if (b<a)
cout<<" + ";
}
hasil = hasil+a;
gotoxy(20,a);
{
cout<<" = ";
cout<<hasil;
}
cout<<endl;
}
getch();
}
Good Luck Friend .... ;)
like this...
BalasHapusMantap gan materinya,,,,
BalasHapus