Do write, but before you start, please explain what does swapping a number mean.
Any kind that you can figure out how to write.
printf(\n "ENTER THE NUMBER\t"); scanf{"%d",&a); while(a!=0); { r=a%2; if(r==0) printf("\n\n THE NUMBER IS EVEN \t"); else printf("\n\n THE NUMBER IS ODD \t"); printf ("\n ENTER THE NUMBER \t"); scanf("%d",&a); } getch(); }
Any of these: PRINT semicolon EMIT ; WRITE ";" etc.
You can use the following C program to display "1" if a user enters any non-zero number, and "0" if the entered number is zero: #include <stdio.h> int main() { int num; printf("Enter a number: "); scanf("%d", &num); if (num != 0) { printf("1\n"); } else { printf("0\n"); } return 0; } This program reads an integer from the user and checks if it is non-zero or zero, then prints the corresponding output.
# Ruby code print 'Enter n: '; n = gets.to_i n.times { | i | puts ( i + 1 ) ** 2 if ( i + 1 ) % 3.0 == 0.0 }
Write a program which takes any number of days from the user. the program should display the number of years, number of months formed by these days as well as the remaining days.
There isn't a reason to write a complete program to do this; in any assembly language just shift the value 1 bit to the left to double it.
user-generated content: disclaimer report abuse = Write a program which will rise any number X to a positive power nobtain values of X and n from user? =
substracion of any two number program in c
Write a program to count the number of IS in any number in register B and put the count in R5.
if you want to add just a half it it 0.5 + 7 = 7.5 but if it is any more you would just swap the 0 for whatever number you wanted e.g. 5.5+7=12.5
Any kind that you can figure out how to write.
i am sam
Any number variable is extends the Number in java and it already implemented Comparable interface. So when you have a list of numbers, just use Arrays.sort().
Not too tough . . . Any number that you can completely write down on paperis a rational number.
printf(\n "ENTER THE NUMBER\t"); scanf{"%d",&a); while(a!=0); { r=a%2; if(r==0) printf("\n\n THE NUMBER IS EVEN \t"); else printf("\n\n THE NUMBER IS ODD \t"); printf ("\n ENTER THE NUMBER \t"); scanf("%d",&a); } getch(); }
Any of these: PRINT semicolon EMIT ; WRITE ";" etc.