code of a program in c language that ask a number and print
its decremented and incremented number..
sample output:
input number : 3
321123
Answer / kurt s
#include <stdio.h>
int main() {
int n, ncpy;
printf("Input number: ");
scanf("%d", &n);
ncpy = n;
while (ncpy > 0) printf("%d", ncpy--);
while (ncpy < n) printf("%d", ++ncpy);
printf("\n");
return 0;
}
| Is This Answer Correct ? | 2 Yes | 1 No |
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
Give a oneline C expression to test whether a number is a power of 2?
25 Answers EA Electronic Arts, Google, Motorola,
main() { int i =0;j=0; if(i && j++) printf("%d..%d",i++,j); printf("%d..%d,i,j); }
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
0 Answers Mbarara University of Science and Technology,
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
why nlogn is the lower limit of any sort algorithm?
write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30
main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }
Display the time of the system and display the right time of the other country