Minggu, 09 Maret 2014

27. Refersing the digit of un integer (Alpro kelompok )

c++ nya sebagai berikut

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

dan flowchatnya :



0 komentar:

Posting Komentar

Posting Lebih Baru Posting Lama Beranda

 

Followers

 

Blogroll

Templates by ridha ammi | CSS3 by David Walsh | Powered by {N}Code & Blogger