If input is 123 then how to print 100 and 20 and 3 seperately?
Answer Posted / dhruv sharma rkdf
#include<stdio.h>
#include<conio.h>
void main(){
int n,temp,i=1;
clrscr();
printf("enter number:");
scanf("%d",&n);
for(;n>0;n=n/10){
temp=(n%10)*i;
i*=10;
printf("%d\n",temp)
}
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
What is a node in c?
What are pragmas and what are they good for?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
How do you print only part of a string?
When should volatile modifier be used?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
What type of function is main ()?
What is n in c?
What is the correct code to have following output in c using nested for loop?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What is fflush() function?
Where define directive used?
In a switch statement, explain what will happen if a break statement is omitted?