#include
int jumlah(int a)
{
if (a==0)
return 0;
else return a+jumlah(a-1);
}
main(){
int n,x,y;
printf("Masukkan Bilangan Bulat :");scanf("%d",&n);
y=1;
for(x=1;x<=n;x++)
{
printf("%d+",y);y++;
}
printf("\nJumlah :%d",jumlah(n));
}
Copyright © ◀▬ ♥ Szi Chipi ♥▬▶
Template by Blog Template 4 U | Blogspot Tutorial | Blogger
Comments :
0 komentar to “Fungsi "Penjumlahan Rekursif"”
Posting Komentar