سلام عليكم ارجو مساعدتي اعطانا الدكتور سؤالين صراحه من جد مافهمتها احسها غريبه
ارجوكم ساعدوني
سؤال 2.6 صفحه 64 بالكتاب
===============
2.6
(Summing the digits in an integer) Write a program that reads an integer between
0
and 1000 and adds all the digits in the integer. For example, if an integer is 932,
the sum of all its digits is 14.
Hint
: Use the % operator to extract digits, and use the / operator to remove the
extracted digit. For instance, 932 % 10 = 2 and 932 / 10 = 93.
Here is a sample run:
============
وسؤال 2.11 صفحه 65 في الكتاب
Comprehensive
2.11*
(Financial application: payroll) Write a program that reads the following information
and prints a payroll statement:
Employee’s name (e.g., Smith)
Number of hours worked in a week (e.g., 10)
Hourly pay rate (e.g., 6.75)
Federal tax withholding rate (e.g., 20%)
State tax withholding rate (e.g., 9%)
Write this program in two versions: (a) Use dialog boxes to obtain input and display
output; (b) Use console input and output. A sample run of the console input
and output is shown below:
================
تكفون ساعدوني الدكتور يبي الواجب السبت اللي يعرف يفيدنا