get any number as input except 1 and the output will be
1.without using operators,expressions,array,structure.don't
print 1 in printf statement
Answers were Sorted based on User's Feedback
Answer / bheemakarna1989
example
input : 4554
output : 1
input :567
output : 1
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / karna
void main()
{
int n;
printf("%d",scanf("%d",n));
getch();
}
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / amarnathreddy
i am going to write only logic
n=1000
n1=n-(n-1)
1000-999=1
Is This Answer Correct ? | 3 Yes | 4 No |
How do we print only part of a string in c?
What is mean by data types in c?
main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }
Main must be written as a.the first function in the program b.Second function in the program c.Last function in the program d.any where in the program
19 Answers CTS, HCL, TCS,
In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }
read a number & print all its devisors using c-program?
wat s the meaning of (int *)p +4;
Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use printf statements;use two nested loops instead. you will have to use braces around the body of the outer loop if it contains multiple statements.
Is file a keyword in c?
Is that possible to add pointers to each other?
Write a function in c to find the area of a triangle whose length of three sides is given.
#include<stdio.h> int main( ) { Int a=300, b, c; if(a>=400) b=300; c=200; printf(“%d%d ”, b, c); return0; }