#include<stdio.h>
main()
{
int i, j, jml;
char bil[50];
printf(“Membalik Bilangan “);
printf(“\n—————–\n”);
main()
{
int i, j, jml;
char bil[50];
printf(“Membalik Bilangan “);
printf(“\n—————–\n”);
puts(“Input bilangan: “); gets(bil);
jml=0;
jml=0;
for (i=0;bil[i];i++)
{
jml=jml++;
}
printf(“Jika dibalik menjadi:\n”);
{
jml=jml++;
}
printf(“Jika dibalik menjadi:\n”);
for(j=jml-1;j>=0;j–)
{
printf(“%c”,bil[j]);
}
printf(“\n\n”);
}
{
printf(“%c”,bil[j]);
}
printf(“\n\n”);
}
0 komentar:
Posting Komentar