Tuesday, March 9, 2010

tugas coding C++

//monstro23 (^,^)v
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
int a,b,c;
cout << "hallo selamat datang di program segitiga pascal" ;
cout <<"\n";
cout <<"\n";
cout << "input nilai yang di inginkan : ";
cin >> a;
{
for ( b=1; b<=a; b++ )
{ for (c=1; c<=b; c++)
cout << c << " " ;
cout <<"\n";
}

}
system("PAUSE");
return EXIT_SUCCESS;
}
--------------------------------------------------------------------------------
INPUT:
Image and video hosting by TinyPic

OUTPUT:

Image and video hosting by TinyPic

No comments:

Post a Comment