Progam help ?

  • Thread starter mkbh_10
  • Start date
  • #1
222
0
I am using this program to calculate the no. of notes of denomination 10,50&100 in a given amount but i am getting error as soon as i enter the amount ?

#include<stdio.h>
#include<conio.h>

main ()
{
int a,b,c,a1,b1,c1;
int p;

printf ("enter the amount to be withdrawn Rs p \n");

scanf(" %d",p);

a=10;
b=50;
c=100;


a1= p-(b+c)/a;
b1= p-(a+c)/b;
c1= p-(a+b)/c;



printf("the number of notes of type a1 = %d",a1);
printf("\n");
printf("the number of notes of type b1 = %d",b1);
printf("\n");
printf("the number of notes of type c1 = %d",c1);
getch();

}


What is the error , it compiles the prog successfully but after that shows error
 
  • #2
scanf("%d",&p);
 

Suggested for: Progam help ?

Replies
1
Views
197
Replies
3
Views
610
Replies
2
Views
875
Replies
3
Views
1K
Replies
7
Views
756
Replies
3
Views
3K
Replies
3
Views
553
Back
Top