Laman

Jumat, 26 November 2010

Contoh Latihan Nested For menggunakan Borland C++

/*--------------------*/
/*Program Nested For*/
/*--------------------*/

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
main()
{
int a,b;
clrscr();
for(a=1;a<=5;a++)
{
    printf("\n");
    for(b=1;b<=a;b++)
   cout<<" "<<a;
}
getch();
}

Tidak ada komentar:

Posting Komentar