Question
C PROGRAMMING LANGUAGE IT SHOULD BE IN C LANGUAGE 1. Write a program that determines the number of coins of different denominations to be returned
C PROGRAMMING LANGUAGE
IT SHOULD BE IN C LANGUAGE
1. Write a program that determines the number of coins of different denominations to be returned as change in a vending machine.
Output:
Enter Amount: 1000
Enter item price: 353
Change is: 647
Denomination:
500 = 1
200 = 0
100 = 1
50 = 0
20 = 2
10 = 0
5 =1
1 =2
2. Using do while statement, write a program to print Fibonacci Series.
Output:
Enter number for series: 10
Fibonacci Series:
0 1 1 2 3 5 8 13 21 34
3. Using while statement, write a program to print 1 to 10 odd numbers.
Output:
1
3
5
7
9
4. Using nested loop, write a program that will display asterisk in the following format.
Output:
* * * * * * * * * * * * * * *
5. Using for loop statement, write a program to calculate factorial of given number. Output:
Enter n value: 8
Factorial of 8 is 40320
IT SHOULD BE IN C PROGRAMMING LANGUAGE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started