J
jyck91
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
main()
{
float num;
int i, temp, remainder, baseM, j;
printf("Enter a number:");
scanf("%f",&num);
printf("Enter the base that you want:");
scanf("%d",&j);
if (temp > baseM){
temp = num;
remainder = temp % baseM;
temp = temp / baseM;
}
for ( i=num; i>=0; i++)
remainder = remainder;
printf("%s",remainder);
system("PAUSE");
}
****** this is a base conversion program(part 2)
I want to convert the base10 number to baseM( first in 2-9)
eg. 5(10)------>101(2)
eg. 10(10)-----> 22(4)
******the above program can not run and there are some mistake that i
can't find out
please help me to correct them
******Since i need to hand in it tomorrow , please help me as soon as
possible
thank you for your help
#include <stdlib.h>
#include <string.h>
#include <math.h>
main()
{
float num;
int i, temp, remainder, baseM, j;
printf("Enter a number:");
scanf("%f",&num);
printf("Enter the base that you want:");
scanf("%d",&j);
if (temp > baseM){
temp = num;
remainder = temp % baseM;
temp = temp / baseM;
}
for ( i=num; i>=0; i++)
remainder = remainder;
printf("%s",remainder);
system("PAUSE");
}
****** this is a base conversion program(part 2)
I want to convert the base10 number to baseM( first in 2-9)
eg. 5(10)------>101(2)
eg. 10(10)-----> 22(4)
******the above program can not run and there are some mistake that i
can't find out
please help me to correct them
******Since i need to hand in it tomorrow , please help me as soon as
possible
thank you for your help