Do write, but before you start, please explain what does swapping a number mean.
for example a =5 and b=10
then answer is
a = a+b; //a = 5+10 = 15
b=a-b; // b= 15-10= 5
a= a-b; // a= 15-5 = 10
x = a
a = b
b = x
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.
# Ruby code print 'Enter n: '; n = gets.to_i n.times { | i | puts ( i + 1 ) ** 2 if ( i + 1 ) % 3.0 == 0.0 }
Any type will do, here is an example: for (leave= 0, nnum= 0; ! leave; ) { rc= scanf ("%d", &number); if (rc!=1 number==-1) { leave=1; continue; } ++nnum; ... do something with number ... }
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
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
Write a program to count the number of IS in any number in register B and put the count in R5.
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.