program to reverse the order of digits in a given number of
any length.
main()
{
long int a;
int num[];
clrscr();
printf("enter a number");
scanf("%ld",&a);
while(a!=0)
{
d=a%10;
static int i=0;/* here we declare variable as static life
time is thru out the prgm*/
num[i]=d;/* store end of digits in array
i++;
a=a/10;
}
printf("reverse of d num is");
for(int x=0;x<i;x++)
printf("%d",num[x]);
}
| Is This Answer Correct ? | 10 Yes | 6 No |
"c sharp" code for factorial using static variables
program for string reverse(eg:- i am boy -> boy am i)
8 Answers Black Pepper, Infosys, Mind Tree,
Give the code for Handling Mouse Events?
Using C# Write a program that performs the following. The user inputs a number and then enters a series of numbers from 1 to that number. Your program should determine which number (or numbers) is missing or duplicated in the series, if any. For example, if the user entered 5 as the initial number and then entered the following sequences, the results should be as shown. Input Sequence Output ---------------------- --------------- 1 2 3 4 5 Nothing bad However, if 7 were the high number, the user would see the results on the right for the following number entries: Input Sequence Output ---------------------- --------------- 1 3 2 4 5 Missing 6 Missing 7 And if 10 were the high number and the user entered the numbers shown on the left, note the list of missing and duplicate numbers: Input Sequence Output ---------------------- --------------- 1 2 4 7 4 4 5 10 8 2 6 Duplicate 2 ( 2 times) Missing 3 Duplicate 4 ( 3 times ) Missing 9 The program should check the high number that the user inputs to ensure that it does not exceed the size of any array you might be using for storage.
program for addition of fraction(M/N + P/Q = Y/Z)
Can you declare an array of mixed Types?
How to use ASP.NET 2.0's TreeView to Display Hierarchical Data?
how to get the table names via c sharp and column names also?
how to change password in .net with c # with ado.net and also SQL server 2008 change password
program for straight line(y=mx+c)
How to Link Different Data Sources Together?
Write a program to count the number of characters, number of words, number of line in file.