#include<stdio.h>
#include<conio.h>
int main()
{
int product=1,i=1;
int n;
for( ;i<=4;i++)
{
scanf("%d",&n);
if(n==0) continue;
product*=n;
}
printf("product=%d",product);
getch();
return 0;
}
/*if user entters 0 it neglects the input and proceeds to the next.....one...........
#include<conio.h>
int main()
{
int product=1,i=1;
int n;
for( ;i<=4;i++)
{
scanf("%d",&n);
if(n==0) continue;
product*=n;
}
printf("product=%d",product);
getch();
return 0;
}
/*if user entters 0 it neglects the input and proceeds to the next.....one...........
No comments:
Post a Comment