C complete programming for b-tech students
Wednesday, 6 July 2011
C programme for multiplication of digits
#include <stdio.h>
#include <conio.h>
void main()
{
int prod=1,n,a;
clrscr();
printf("enter a number");
scanf("%d",&n);
while(n>0)
{
a=n%10;
prod=prod*a;
n=n/10;
}
printf("%d",&prod);
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment