Select Menu

Search This Blog

Populer Posts Hari ini

Popular Posts

Powered by Blogger.

Lorem 1

adsense

" });

Circle Gallery

" });

News

" });
» » fungsi for membuat segitiga pertambahan angka dengan bahasa C

#include<stdio.h>
#include<conio.h>

main(){
  int baris,angka=1;
  printf("Masukkan banyak baris : ");scanf("%i",&baris);
  printf("\n");

  for(int y=1; y<=baris; y++){
     for(int x=1; x<=y; x++){
printf("%d\t ",angka);
angka = angka + 1;
     }
     printf("\n");
   }
 getch();
}

About andi

«
Next
Newer Post
»
Previous
Older Post

No comments

Leave a Reply