when i run this program this takes input for a two times even if scanf is used only once,WHY?????
#include<stdio.h>
#include<conio.h>
int main(){
int a,b,i=1,product;
printf("Enter the value of a\n");
scanf("%d\n",&a);
printf("Enter the value of b\n");
scanf("%d\n",&b);
while(i<b){
product = i*3;
if(product > a){
printf("%d*3 = %d\n",i,product);
}
i = i + 1;
}
}