Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
ඕනම රටකට සෙට් වෙන CV එකක්
ErMurazor
Updated:
Today at 9:50 AM
Hambantota
7 Acres Beachfront Land For Sell DownSouth , PerPerch Price 420 000
1024 Digital
Updated:
Wednesday at 11:57 AM
Baseus PI LITE INDOOR CAMERA
ErMurazor
Updated:
Monday at 12:26 PM
Ad icon
Colombo
Hard Disk For Sale
mazza
Updated:
Oct 10, 2026
land for sale
justasking
Updated:
Oct 10, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
BIT කරන අය එන්න මෙතෙන්ට
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="nadeed" data-source="post: 23038060" data-attributes="member: 69002"><p><strong><span style="font-size: 12px">Can someone help me to complete these C programming language questions </span></strong></p><p><strong><span style="font-size: 12px"></span></strong></p><p>1. In an Internet Café customers are charged as follows for browsing:</p><p>a) First hour or part of an hour – 40 Rupees</p><p>b) For each hour after that – 20 Rupees per hour or part of an hour</p><p>Write a C program such that when the user enters the number of hours of Internet Connection, the program displays the amount to charge from the customer.</p><p></p><p>Example: If a user browsed the Internet 3 hours and 15 minutes,</p><p>Charge = 40 Rs for the 1st hr+20*3 Rs for the next 2 hr and 15 min</p><p> </p><p>2. As an Engineering student you are asked to write a program for a PIC microcontroller where given a certain amount of money it will display the minimum number of 1000/=, 500/=, 200/=, 100/=, 50/=, 20/=, 10/=, 5/=, 2/=, 1/= notes and coins needed.</p><p></p><p>e.g. Amount = 3677</p><p></p><p>Your program should print</p><p>1000 Notes – 3</p><p>500 Notes - 1</p><p>200 Notes - 0</p><p>100 Notes - 1</p><p> 50 Notes - 1</p><p> 20 Notes - 1</p><p> 10 Notes - 0</p><p> 05 Notes - 1</p><p> 02 Notes - 2</p><p> 01 Notes - 0</p><p></p><p>Hint :</p><p>1000 Rupee Notes = 2754 / 1000 = 2</p><p>Remaining Amount = 2754 % 1000 = 754</p><p>You need to use suitable variables.</p><p> </p><p>3. You are required to program a PIC16F877A microcontroller, where a user is required to choose a color between RED=1 ,GREEN=2 & BLUE=3 and has to insert the chosen color number to the system. By checking the user input the program gives out the results as,</p><p>If the number is equal to 1 -> You chose RED color!</p><p>If the number is equal to 2 -> You chose GREEN color!</p><p>If the number is equal to 3 -> You chose BLUE color!</p><p>If the number is not equal to either of the values -> You did not choose any color!</p></blockquote><p></p>
[QUOTE="nadeed, post: 23038060, member: 69002"] [B][SIZE="3"]Can someone help me to complete these C programming language questions [/SIZE][/B] 1. In an Internet Café customers are charged as follows for browsing: a) First hour or part of an hour – 40 Rupees b) For each hour after that – 20 Rupees per hour or part of an hour Write a C program such that when the user enters the number of hours of Internet Connection, the program displays the amount to charge from the customer. Example: If a user browsed the Internet 3 hours and 15 minutes, Charge = 40 Rs for the 1st hr+20*3 Rs for the next 2 hr and 15 min 2. As an Engineering student you are asked to write a program for a PIC microcontroller where given a certain amount of money it will display the minimum number of 1000/=, 500/=, 200/=, 100/=, 50/=, 20/=, 10/=, 5/=, 2/=, 1/= notes and coins needed. e.g. Amount = 3677 Your program should print 1000 Notes – 3 500 Notes - 1 200 Notes - 0 100 Notes - 1 50 Notes - 1 20 Notes - 1 10 Notes - 0 05 Notes - 1 02 Notes - 2 01 Notes - 0 Hint : 1000 Rupee Notes = 2754 / 1000 = 2 Remaining Amount = 2754 % 1000 = 754 You need to use suitable variables. 3. You are required to program a PIC16F877A microcontroller, where a user is required to choose a color between RED=1 ,GREEN=2 & BLUE=3 and has to insert the chosen color number to the system. By checking the user input the program gives out the results as, If the number is equal to 1 -> You chose RED color! If the number is equal to 2 -> You chose GREEN color! If the number is equal to 3 -> You chose BLUE color! If the number is not equal to either of the values -> You did not choose any color! [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom