given integer number,write a program that displays the
number as follows:
First line :all digits
second line : all except the first digit
.
.
.
.
Last line : the last digit

Answer Posted / royalrdx

#include <stdio.h>
#include <math.h>

int main()
{
int n,a,count=0,b;
printf("Enter");
scanf("%d",&a);
n=a;
while(n>0){
count++;
n=n/10;
}

while (count>0)
{
b=pow(10,count);
printf("
%d
",a%b);
count--;
}
return 0;
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Sir... please give some important coding questions asked by product companies..

1805


could you please send the program code for multiplying sparse matrix in c????

3079


Write a program to model an exploding firecracker in the xy plane using a particle system

3697


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

3036


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

2342






How can you relate the function with the structure? Explain with an appropriate example.

2925


Write a routine to implement the polymarker function

4389


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

2267


Develop a routine to reflect an object about an arbitrarily selected plane

3004


Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?

3861


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

3720


write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??

4153


why nlogn is the lower limit of any sort algorithm?

2381


write a program for area of circumference of shapes

2040


Design an implement of the inputs functions for event mode

2970