Thursday, 2 June 2016
A simple advice to all visiters never copy code for your assingment just take a hint from over programs it will help you to solve your assignment.
C Programs
1.Write a C Program for calculating a student’s letter grade given the following.
90–100 = A 80–89 = B 70–79 = C 60–69 = D below 60 = F
CLICK HERE
2.Write a C Program for the following set of conditions:
R = 50 for S <= 1000
R = 100 for S = 1001–4000
R = 250 for S = 4001–8000
otherwise R = 75
CLICK HERE
3.Write a C Program for to calculate the water bill given the cubic feet of water used for Eureka Water Company, which charges the homeowner one of the following:
A flat rate of $15.00 for usage up to and including 1000 cubic feet.
$0.0175 per cubic foot for usage over 1000 cubic feet and up to and including 2000 cubic feet.
$0.02 per cubic foot for usage over 2000 cubic feet and up to and including 3000 cubic feet.
A flat rate of $70.00 for usage over 3000 cubic feet.
CLICK HERE
4.Write a C Program to print the ticket charge given the age of the person. The charges are as follows:
Over 75: $10.00
55–74: $12.00
21–54: $15.00
13–20: $10.00
3–12: $5.00
Under 3: Free
click here
5.A customer needs a specific amount of paper. The charges on the paper are $0.10 for single sheets, $0.055 for amounts in multiples of 100 sheets, $0.04 in multiples of 500 sheets, and $0.03 in multiples of 1000 sheets Write a C Program to calculate the type and number of package(s) for the least amount of money the customer should buy, given the minimum amount of sheets the customer needs. For example, if the customer needs 380 sheets, the amount she would pay when buying in multiples of 100 would be $22.00. However, if the customer bought 500 sheets, the cost would be $20.00. It would be cost effective for the customer to buy a package of 500 sheets.
CLICK HERE
6.A hotel has a pricing policy as follows:
2 people: $85 3 people: $90 4 people: $95 Additional people: $6 per person
If the customer is staying on company business, there is a 20% discount. If the customer is over 60 years of age, there is a 15% discount. A customer does not receive both discounts. Given the above data, Write a C Program to print the cost of the room.
CLICK HERE
7.A manufacturer would like to have a device for a car that will turn on a light when the temperature is between 34 and 40 degrees Fahrenheit (F) and sound a warning signal when the outside temperature is 34 degrees F or below. The light and the sound are never going simultaneously. Write a C Program for solution to this problem. (Hint: Use the enter statement to input the present outside temperature. Print out what should happen, instead of actually turning on the light.)
CLICK HERE
8.Joan is planning her vacation. She is considering two different destinations. She would like to go to the one that will be less expensive for the total trip including gas, hotel room for six nights, and meals for seven days. Write a C Program to tell her which of the destinations would be the less expensive.
CLICK HERE
9.Mr. Bhola is not aware of Gregorian calendar dates. However, he knows that date is in the format ddmmyyyy. You are to Write a C Program for Mr. Bhola which he can run and determine whether a certain 8 digit number is a valid date or not. If date is valid print valid date, else print invalid.
CLICK HERE
10.Mr. Uncle is very happy with the skills of PS & CP students. He would like you to solve a new problem that takes amount as integer num in input and output its value in words. You are required to generalize the solution for any amount. Write a C Program for solving this problem.
Sample Input
Sample Output
2000
Two Thousand Rupees
545
Five hundred and Forty Five Rupees
1300
Thirteen Hundred Rupees
100000
One Hundred Thousand Rupees 1000000000
One Billion Rupees
CLICK HERE
11.Take 8 integer inputs; say X1, Y1, X2, Y2, X3, Y3, X4, Y4. Determine whether these inputs form a rectangle, a square or neither in coordinate plane. Assume that two consecutive inputs form a coordinate point (x, y). If the points form a rectangle or a square then output name of shape with its perimeter.
Sample Input
Sample Output
(0,0) (0,0) (0,0) (0,0)
The points given forms a square with perimeter 0 units
(0,0) (0,4) (4,0) (4,4)
The points given forms a square with perimeter 16 units
(0,0) (4,0) (0,2) (4,2)
The points given forms a rectangle with perimeter 12 units
(0,0) (0,4) (4,2) (0,1)
The points given neither form a square nor a rectangle.
(3,3) (0,0) (6,0) (3,-3)
The points given forms a square with perimeter 12 units
CLICK HERE
12.Write a C Program that uses nested loops to produce a N x N (square) matrix A with 0's in the diagonal, 1's in the entries just above and below the diagonal element, 2's above and below that, and so on. The 5 x 5 matrix should look like this:
0 1 2 3 4
1 0 1 2 3
2 1 0 1 2
3 2 1 0 1
4 3 2 1 0
click here
13.Write a C Program to print all first N elements of binary numbers series.
For N = 3, output is 0,1,10
For N = 5, output is 0,1,10, 11, 100
click here
14.Write a C Program to print all first N elements of prime numbers series.
For N = 4, output is 2, 3, 5, 7
For N = 6, output is 2, 3, 5, 7, 11, 13
click here for program
1 2 3 next page
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment