Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<iostream>
- using namespace std;
- int main()
- {
- int i, j, num=1, k;
- cout<<"Masukkan Jumlah Baris: ";
- cin>>k;
- for(i=0; i<k; i++)
- {
- num=1;
- for(j=0; j<=i; j++)
- {
- printf("%d ",num);
- num++;
- }
- printf("\n");
- }
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment