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
Sir... please give some important coding questions asked by product companies..
could you please send the program code for multiplying sparse matrix in c????
Write a program to model an exploding firecracker in the xy plane using a particle system
Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines
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
How can you relate the function with the structure? Explain with an appropriate example.
Write a routine to implement the polymarker function
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 ?
Develop a routine to reflect an object about an arbitrarily selected plane
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
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??
why nlogn is the lower limit of any sort algorithm?
write a program for area of circumference of shapes
Design an implement of the inputs functions for event mode