If input is 123 then how to print 100 and 20 and 3 seperately?
Answer Posted / charusheela
#include<stdio.h>
#include<conio.h>
void main(){
int num=123,r,i=1;
clrscr();
while(num)
{
r=num%10;
printf("%d\n",r*i);
i*=10;
num/=10;
}
getch();
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is LINKED LIST? How can you access the last element in a linked list?
How can I convert a number to a string?
What is the difference between constant pointer and constant variable?
Does c have class?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
How can I find out if there are characters available for reading?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
How would you rename a function in C?
What is the difference between null pointer and wild pointer?
What is wrong in this statement? scanf(“%d”,whatnumber);
Can you please explain the difference between exit() and _exit() function?
What is the use of function overloading in C?
How would you obtain the current time and difference between two times?
What does %p mean?
Why do we need a structure?