Guest_imported
New member
- Jan 1, 1970
- 0
i have this problem:
#include <conio.h>
#include <stdio.h>
void main()
{
int cd;
int cookies;
int pens;
int games;
printf("Enter the number of cd's you buy "
scanf("%d",&cd);
printf("Enter the number of cookies you buy"
scanf("%d",&cookies);
printf("Enter the number of pens you buy"
scanf("%d",&pens);
printf("Enter the number of games you buy"
scanf("%d",&games);
}
and when i run it i have to enter 1 on the first scanf. and the second scanf i have to enter it twice. and so on so please help.
#include <conio.h>
#include <stdio.h>
void main()
{
int cd;
int cookies;
int pens;
int games;
printf("Enter the number of cd's you buy "
scanf("%d",&cd);
printf("Enter the number of cookies you buy"
scanf("%d",&cookies);
printf("Enter the number of pens you buy"
scanf("%d",&pens);
printf("Enter the number of games you buy"
scanf("%d",&games);
}
and when i run it i have to enter 1 on the first scanf. and the second scanf i have to enter it twice. and so on so please help.