Commit 20dd0417 by Jürgen Hein

Upload New File

parent 75366adc
Showing with 36 additions and 0 deletions
#include <stdio.h>
#include <stdio.h>
int main(void){ //Kahekohaline kümnendsüs number
int D,i; //Kahendsüsteemi muutmine
int G=0; //Programmi kordamiseks
int A[10];
do
{
do
{
printf("Insert D(0<D<100\n");
scanf("%d",&D);
}while(D<=0 || D>=100);
i=0;
while(D<0)
{
A[i]=D%2; //Jäägi leidmine
D= D / 2;
i++;
}
do
{
printf("%d",A[i-1]);
i--;
}while(i>=1);
printf("\n");
printf("Uuesti konverteerida?");
printf("Trükkige 0, et programmist väljuda\n");
scanf("%d",&G);
}while(G !=0);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment