tag:blogger.com,1999:blog-79274454663804747632024-02-20T17:14:58.810-08:00Programming questions.Freemanhttp://www.blogger.com/profile/02560394978284437571noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-7927445466380474763.post-3466059998493617042013-01-17T09:02:00.000-08:002013-03-04T06:51:03.143-08:00<h2>Sequence Questions</h2>
<ol>
<li>Write a pseudocode that will accept two numbers from the user and store them in two variables and output them as interchanged values.</li>
<li>Write a pseudocode that accept the value of the side of a square and display its area. (area=side * side)</li>
<li>Write a pseudocode that will accept the price of an item and calculate its new price after a discount of 25%.</li>
<li>The Government of Sands has decided to introduce VAT (Value Added Tax) for all items being purchased. So all items sold will be added 15% of its price as VAT. Write a pseudocode that will accept the price of an item and calculate and display its new price including VAT.\</li>
<li>Write a pseudocode that will accept the values for principal, No. of Years and interest rate and calculate and display the simple interest. (Simple Interest = Principal *Years *Rate/100)</li>
<li>Write a pseudocode that prompt the user to enter the radius of a circle and calculate its circumference. (Circumference = 2 * 3.142 * radius)</li>
<li>Write a pseudocode that prompt the user to enter the base and height of a triangle and calculate its area. (Area = 1/2 * base *height)</li>
<li>Write a pseudocode that will read in the money in US dollars and convert and display it in EC dollars. (1US = 2.7EC) It should be displayed in the following format: 2US = 5.4EC</li>
<li>An insurance company gives their sales men a commission of 5% if their total sales is more than $50,000. Write a pseudocode that prompts the user to enter the total sales and calculate and display their commission.</li>
<div><br /></div>
<h2>Selective Questions</h2>
<li>Write a pseudocode that will allow the user to enter the mark of a subject for a student and display the message "Pass" if the score is more than or equal to 60. Otherwise display the message "Fail".</li>
<li>Write a pseudocode that will prompt the user to enter a number. If the number entered is more than 10 display the message "The number is more than 10" otherwise display the number being entered.</li>
<li>Write a pseudocode that will prompt the user to enter the name and price of an item. If the price is more than $350, print the price of the item otherwise output the name of the item.</li>
<li> Write a pseudocode that will accept a number. If the number is more than 10, then subtract 10 from it and multiply by 3, otherwise add 10 and multiply by 2 and display the results.</li>
<li>An exam board uses the following criteria for assigning grades for students:
<dl><dd><b>Score..................Grade</b></dd>
<dd>100% - 80%............Excellent(E)</dd>
<dd>79% - 60%.............Good(G)</dd>
<dd>59% - 45%.............Satisfactory(S)</dd>
<dd>44% - 33%.............Unsatisfactory(US)</dd>
<dd>Below 33%.............Very Unsatisfactory</dd>
<div><br /></div>
<dd> Write a pseudocode that will accept the score of a student in a test and display the grades above based on the criteria.</dd></dl>
</li>
<li>A talent show at Saddlers Secondary School attracts the following rates:
<dl><dd>18 years or more..........$25</dd>
<dd>10-12 years................$15</dd>
<dd>Below 10 years ............$5</dd>
<div><br /></div>
<dd> Write a pseudocode that will accept the age of a person attending the show and display the correct rate.</dd></dl></li>
<li>The water department uses the following charges for their customers:
<dl><dd>1000 gallons or more........$100 as fixed charge plus 5 cents per gallon</dd>
<dd>500-999 gallons..........$50 as fixed charge plus 3 cents per gallon</dd>
<dd>Below 500 gallons..........$50 as fixed charge plus 2 cents per gallon</dd>
<div><br /></div>
<dd>Write a pseudocode that will accept the name and the volume of water used by a customer and display their bill with the name and charge.</dd></dl></li>
<li>A school uses the following criteria for placement of students in their fifth form classes:
<dl><dd><b>Subject passes..............Class</b></dd>
<dd>9 - 10 subject passes........Form 5 I</dd>
<dd>7 - 8 subject passes.........Form 5 II</dd>
<dd>5 - 6 subject passes.........Form 5 III</dd>
<dd>Below 5 subject passes......Form 5 IV</dd>
<div><br /></div>
<dd>Write a pseudocode that will accept the name and total number of subjects passed by a student and print their name and class.</dd></dl></li>
<li>Employees of Shopmart is paid daily salary at an hourly rate of $10. If they work more than 8 hours in a day, they will get double the hourly rate of salary for the hours worked in excess of 8 hours. Write a pseudocode that will accept the total hours worked in a day and print their salary.</li>
<li> Write a pseudocode that will accept the time of the day and display the message "Good Morning", "Good Afternoon" and "Good night" based on the time entered.</li>
<div><br /></div>
<h2>Iteration Questions</h2>
<li>Write a program that will display numbers 1 - 100.</li>
<li>Write a program that will display the ten (10) times table.</li>
<li>Write a pseudocode that will display the below diagram using *.<dl><dd>
**********<br />
*********<br />
********<br />
*******<br />
******<br />
*****<br />
****<br />
***<br />
**<br />
*</dd></dl></li>
<li>Write a pseudocode that will display the below diagram using stars ten (10) times*.<dl><dd>
**********<br />
***</dd></dl></li>
<li>Write a pseudocode that will display the below scenario.<dl><dd>
1 2 3 4 5 6 7 8 9 10<br />
2 4 6 8 10 12 14 16 18 20<br />
3 6 9 12 15 18 21 24 27 30<br />
4 8 12 16 20 24 28 32 36 40<br />
5 10 15 20 25 30 35 40 45 50<br />
6 12 18 24 30 36 42 48 54 60<br />
7 14 21 28 35 42 49 56 63 70<br />
8 16 24 32 40 48 56 64 72 80<br />
9 18 27 36 45 54 63 72 81 90<br />
10 20 30 40 50 60 70 80 90 100<br />
11 22 33 44 55 66 77 88 99 110<br />
12 24 36 48 60 72 84 96 108 120</dd></dl></li>
<li>Write a pseudocode that will allow the user to enter a number and display its first twelve (12) multiples. Use 999 to end/terminate the program.</li>
<li>Write a pseudocode to calculate the area of a trapezium. The program should allow the user to calculate the area multiple times but be terminated using any method of choice.</li>
<li>Write a pseudocode that will prompt the user to enter a multiple numbers. The numbers should be added and there sum should be display at the end. The program should be terminated using 999.</li>
<li>Write a pseudocode that will enter names and display it to the screen. Program should enter the first name separate to the last name and should repeat until terminated by the user.</li>
<li>Write a pseudocode that will read in the money in US dollars and convert and display it in EC dollars. (1US = 2.7EC) It should be displayed in the following format: 2US = 5.4EC. The program should repeat until terminated by user.</li>
<li>Write a pseudocode that prompt the user to enter the radius of a circle and calculate its circumference. (Circumference = 2 * 3.142 * radius) The program should repeat until terminated by user.</li>
</ol>Freemanhttp://www.blogger.com/profile/02560394978284437571noreply@blogger.com0