Calculate No. of Notes: Denominations 10, 50, and 100 in Given Amount

  • Thread starter mkbh_10
  • Start date
In summary, The conversation is about a program that calculates the number of notes of three different denominations (10, 50, and 100) in a given amount. The speaker is encountering an error as soon as they enter the amount. The program compiles successfully but shows an error when using the scanf function.
  • #1
mkbh_10
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
 
Technology news on Phys.org
  • #2
scanf("%d",&p);
 
  • #3
while entering the amount?

I suggest checking the code for any syntax errors or logical errors. It is also important to ensure that the input is being correctly read and stored. Additionally, it may be helpful to include error handling in the code to prevent any issues with entering the amount.
 

1. What is program help?

Program help is a feature that provides assistance and support for users of a particular program or software. It usually includes tutorials, troubleshooting guides, and other resources to help users navigate and use the program effectively.

2. How do I access program help?

The way to access program help may vary depending on the program you are using. However, most programs have a designated help button or menu option that you can click on to access the help feature. Some programs also have a shortcut key, such as F1, that will automatically open the help feature.

3. Is program help available for all programs?

Not all programs have a built-in help feature, but most popular programs and software do offer some form of program help. If you cannot find the help feature within the program, you can also try searching for online tutorials or contacting the program's customer support for assistance.

4. Can program help solve all my technical issues?

Program help is designed to provide general assistance and support for users. It may be able to solve common technical issues, but it is not a replacement for technical support. If you are experiencing a specific technical issue, it is best to contact the program's customer support for further assistance.

5. Are there any alternatives to program help?

Yes, there are various alternatives to program help, such as online forums, user communities, and tutorials. These resources may provide more in-depth and specific guidance for using a program. Additionally, you can also consider hiring a professional or seeking help from a knowledgeable friend or colleague.

Similar threads

  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
Replies
7
Views
1K
  • Programming and Computer Science
Replies
20
Views
2K
  • Programming and Computer Science
Replies
6
Views
5K
  • Programming and Computer Science
Replies
3
Views
993
  • Engineering and Comp Sci Homework Help
Replies
3
Views
661
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
2
Replies
47
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
872
  • Programming and Computer Science
Replies
5
Views
1K
Back
Top