21 Ocak 2013 Pazartesi

10'Lu Tabandaki Sayıyı 2'Lik Tabana Çevirme

By Unknown  |  10:16 No comments


Bu programı arkadaşım bayağı aramıştı.Bende onun için yapmıştım.Sizede inşallah faydalı olur.
Kodlar:





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

main()
{
int on,sayi, sayac,i ;
int iki[100];
printf("10'luk Tabaninda Sayi Giriniz : "); scanf("%d", &sayi);
on=sayi;
sayac=0;
while (on>0)
{
sayac++;
iki[sayac]= on % 2;
on = on / 2;
}
for(i=sayac;i>0;i--)
printf("%d", iki[i]);
getch();
}

Ekran Çıktısı :


Author: Unknown

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

0 yorum:

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles

© 2014 Nether Game Lord. WP Nether Game Lord converted by Tema Land. Powered by Blogger.
TOP