To convert a mixed number to an improper fraction, multiply the denominator by the whole number, add that total to the numerator and put the whole thing over the original denominator.
7 and 1/3 = 22/3
Chat with our AI personalities
In simple Python code: def convertToAngle(num): while True: if num < 0: num = 360 - num elif num > 360: num -= 360 else: break return num
# include <stdio.h> void Rec_Dec_To_Bin (int num); void main () { int num; int base; printf ("Enter the decimal number to convert it binary.\n"); scanf ("%d", &num); printf ("The number in decimal is : %d\n", num); printf ("\n"); printf ("The %d in binary is : ", num); Rec_Dec_To_Bin (num); printf ("\n\n"); } void Rec_Dec_To_Bin (int num) { if (((num / 2) != 0) && (num > 1)) { Rec_Dec_To_Bin ((num / 2)); } printf ("%d", (num % 2)); }
The word "numb" means having no feeling or sensation. The abbreviation NUM is used to mean "number."
int num, bin[50], dec, i=1, j; printf("Enter the decimal number : "); scanf("%d",&dec); num = dec; while(num!=0) { bin[i++] = num%2; num = num/2; } printf("\nBinary equivalent of %d : ",dec); for(j=i-1;j>0;j--) { printf("%d",bin[j]); } getch(); }
<?php for($i=1; $i<=1000; $i++) { $num=$i; $sum=0; while($num>=1) { $rem=$num%10; $qub=$rem*$rem*$rem; $sum=$sum+$qub; $num=$num/10; } if($sum==$i) { echo("<br>$sum"); } } ?> visit: http://tutorial.planetetutors.com