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
To change a fraction into a mixed number, divide the numerator (top number) by the denominator (bottom number) to get the whole number. The remainder is the new numerator and gets written over the same denominator. Your welcome! and for imformation go to www.confused.com xxx LOL by Anymonus
First, change the mixed numbers into improper fractions. Like, 3 and 1/2 would be 7/2. Then, multiply it with another improper fraction. We'll say 5/4. So to get the new numerator you would go 5*7=35. Then, for the denominator, you would go 2*4=8. So your answer would be 35/8, or 4 and 3/8.
27-12 as a mixed num = 15
29.8125
#include<stdio.h> #include<conio.h> void main() { int bin[20]; int i=0,num; printf("Enter the number :"); scanf("%d",&num); while(num!=1) { bin[i]=num%2; i++; num=num/2; } bin[i]=num; for(;i>=0;i--) printf("%d",bin[i]); getch(); }
NUM-ber The stress is on NUM.
Dim x As String x = "HELLO" Dim tmpString As String tmpString = Nothing For j = 0 To x.Length - 1 Dim int int=x.Length - 1 int=int-j tmpString=x(j) Next
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 #include void main() { int rev num=0; while(num>0) { rev num=rev num*10+num%10; num=num%10; } return rev_num; } int main(); { int num=4562; printf("reverse of number is%d",reverse digit(num)); getch(); return o; }
/*Reverse the digits of a number,Gankidi*/ #include<stdio.h> void main(void) { int num,sum=0,i,rem; printf("Enter a number"); scanf("%d",&num); while(num>0) { rem=num%10; num=num/10; sum=sum+(rem*10); } printf("the reverse number is %d",sum); }
void main() { int num,r,sum=0; clrscr(); printf("enter the number\n"); scanf("%d",&num); while(num!=0) { r=num%10; sum=sum+r; num=num/10 } printf("The sum of individual digit of given number is=%d",sum); getch() }
#include#includebool is_prime (const unsigned num){if (num "Enter a natural number: ";unsigned num;std::cin