السلام عليكم اعضاء منتدى الفريق العربي للبرمجه انا داخله على الله ثم عليكم
احتاج مساعدتم الله يجزاكم خير
اذا تقدرون تساعدوني في حل هذه المسائل الاستاذه طالبتها علينا وعليها درجات المشاركه 10 درجات وانا محتاجه درجات بالمررررره
واكون لكم شاكره اذا ساعدتوني
Q8: Write a program which inputs a Person's height (in centimeters) and weight (in kilograms) and outputs one of the messages: underweight, normal, or overweight, using the criteria:
Underweight: weight < height/2.5
Normal: height/2.5 <= weight <= height/2.3
Overweight: height/2.3 < weight
Q1: When Sara’s new baby was born, she opened a savings account with $1000. on each birthday, starting with the first, the bank added an additional 4.5% of the balance and Sara added another $500 to the account. Write a loop that will determine how much money was in the account on the childes=’s 18th birthday.
Q2: there are 9870 people in a town whose population increases by 10% each year. Write a loop that determines how many years it would take for the population to exceed 30000.
Q3: write a program that allows the user to enter values and prints out the number of positive values and the number of negative values entered. Use 0 as a sentinel value.
Q4: Write a loop that continues to read pairs of integers until it reads a pair with the property that that the first integer in the pair is divisible by the second
Q5: Write a program fragment with a for loop that accumulates the total number of days for the years 1950 to the year 2000. remember that any year divisible by4 is a leap year and has 366 days.
Q6: Write a program to read in a collection of exam scores ranging in value from 1 to 100. Your program should count and print the number of outstanding scores (90 -100), the number of satisfactory scores (60 – 89), and the number of unsatisfactory scores (1 – 59).
Q7: trace the following program showing the value of its variables as it executes.
User input = 2 5 9 -3
Start
Get number
While number > 0 do
Print “ multiples of number” , number
For cnt = 1 to 4 do
Val = number * cnt
Print Val
EndFor
Get number
EndWhile
Stop
Q8: find the 4 errors in this pseudo-code that calculates the power of a given number ( example if the input is 2 and 4 the result is 16)
Var
number real
power integer
factor real
Start
Print “ enter a number”
Read number
While ( power > 0 ) do
factor = factor * number
EndWhile
Result = factor
Print “the result is :” , result
Stop