SlideShare a Scribd company logo
1 of 3
Write the program that reads two numbers from the keyboard. It
then calculates and print the sum, product, difference of the two
numbers including the two numbers entered. The program
should prompt the user to continue or exit. If the user enters a
(Y/y) then the program prompts the user to enter two numbers
else the program exit.
If the sum of the two numbers is an even number then multiply
the sum by 2.5 and print the new result.
If product of the two numbers is not an even number, then
multiply the product by 2 and print the new result. The program
must also print the two numbers entered.
If difference of the two numbers (number 1 – number 2) is a
negative number then add 10 to the difference of the numbers
and print the new result.
2. Write a program that prints the number series from 1 to a
user-specified limit in the form of a rectangle. Please see
example below.
Please enter a number between 1 and 9:
6
Result:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
3.
Write a program that prompts the user to input two numbers, the
multiplicand (which is the number to be multiplied or repeated),
and the maximum multiplier (which is the number by which it is
to be multiplied (repeat count).
The program should print the multiplication table of the
multiplicand from 1 up to the multiplier. For example, if the
user enters 10 (multiplier) and 5 multiplicand then the program
should print as follows:
1 x 5 = 5
2 x 5 = 10
3 x 5 = 15
4 x 5 = 20
5 x 5 = 25
6 x 5 = 30
7 x 5 = 35
8 x 5 = 40
9 x 5 = 45
10 x 5 = 50

More Related Content

Similar to Write the program that reads two numbers from the keyboard. It.docx

COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018Robert Geofroy
 
Statement of Operations and Financial StatementsSubmit written r.docx
Statement of Operations and Financial StatementsSubmit written r.docxStatement of Operations and Financial StatementsSubmit written r.docx
Statement of Operations and Financial StatementsSubmit written r.docxwhitneyleman54422
 
Little book of programming challenges
Little book of programming challengesLittle book of programming challenges
Little book of programming challengesysolanki78
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxgerardkortney
 
OverviewFor this assignment you will be building two main co.docx
OverviewFor this assignment you will be building two main co.docxOverviewFor this assignment you will be building two main co.docx
OverviewFor this assignment you will be building two main co.docxaman341480
 

Similar to Write the program that reads two numbers from the keyboard. It.docx (8)

COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018
 
Hw5
Hw5Hw5
Hw5
 
Statement of Operations and Financial StatementsSubmit written r.docx
Statement of Operations and Financial StatementsSubmit written r.docxStatement of Operations and Financial StatementsSubmit written r.docx
Statement of Operations and Financial StatementsSubmit written r.docx
 
Little book of programming challenges
Little book of programming challengesLittle book of programming challenges
Little book of programming challenges
 
If switch structure
If switch structureIf switch structure
If switch structure
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docx
 
OverviewFor this assignment you will be building two main co.docx
OverviewFor this assignment you will be building two main co.docxOverviewFor this assignment you will be building two main co.docx
OverviewFor this assignment you will be building two main co.docx
 

More from annetnash8266

writea500-worddefinitioness.docx
writea500-worddefinitioness.docxwritea500-worddefinitioness.docx
writea500-worddefinitioness.docxannetnash8266
 
Writea minimum 300 word reflection in which you compare and.docx
Writea minimum 300 word reflection in which you compare and.docxWritea minimum 300 word reflection in which you compare and.docx
Writea minimum 300 word reflection in which you compare and.docxannetnash8266
 
Writea draft of the paper on case tools and include the followin.docx
Writea draft of the paper on case tools and include the followin.docxWritea draft of the paper on case tools and include the followin.docx
Writea draft of the paper on case tools and include the followin.docxannetnash8266
 
Write  To complete the assignment, open the OUTLINE ATTACHMENT fi.docx
Write  To complete the assignment, open the OUTLINE ATTACHMENT fi.docxWrite  To complete the assignment, open the OUTLINE ATTACHMENT fi.docx
Write  To complete the assignment, open the OUTLINE ATTACHMENT fi.docxannetnash8266
 
Write your proposal based on the criterias listed below Pr.docx
Write your proposal based on the criterias listed below Pr.docxWrite your proposal based on the criterias listed below Pr.docx
Write your proposal based on the criterias listed below Pr.docxannetnash8266
 
Write a 350- to no more than 700-word paper using APA format.D.docx
Write a 350- to no more than 700-word paper using APA format.D.docxWrite a 350- to no more than 700-word paper using APA format.D.docx
Write a 350- to no more than 700-word paper using APA format.D.docxannetnash8266
 
Write a 350- to 700-word paper in which you investigate the interr.docx
Write a 350- to 700-word paper in which you investigate the interr.docxWrite a 350- to 700-word paper in which you investigate the interr.docx
Write a 350- to 700-word paper in which you investigate the interr.docxannetnash8266
 
Write a 350 word analysis about juvenile attitudes toward poli.docx
Write a 350 word analysis about juvenile attitudes toward poli.docxWrite a 350 word analysis about juvenile attitudes toward poli.docx
Write a 350 word analysis about juvenile attitudes toward poli.docxannetnash8266
 
Write a 350- to 700-word paper in which you do the followingExp.docx
Write a 350- to 700-word paper in which you do the followingExp.docxWrite a 350- to 700-word paper in which you do the followingExp.docx
Write a 350- to 700-word paper in which you do the followingExp.docxannetnash8266
 
Write a 350- to 700- word response to the following questionsHo.docx
Write a 350- to 700- word response to the following questionsHo.docxWrite a 350- to 700- word response to the following questionsHo.docx
Write a 350- to 700- word response to the following questionsHo.docxannetnash8266
 
Write a 1,400- to 1,750 word APA format paper regarding a so.docx
Write a 1,400- to 1,750 word APA format paper regarding a so.docxWrite a 1,400- to 1,750 word APA format paper regarding a so.docx
Write a 1,400- to 1,750 word APA format paper regarding a so.docxannetnash8266
 
Write a 350- to 500-word summary in which you answer the following.docx
Write a 350- to 500-word summary in which you answer the following.docxWrite a 350- to 500-word summary in which you answer the following.docx
Write a 350- to 500-word summary in which you answer the following.docxannetnash8266
 
Write a 300- to 350-word response to the followingWhen thinki.docx
Write a 300- to 350-word response to the followingWhen thinki.docxWrite a 300- to 350-word response to the followingWhen thinki.docx
Write a 300- to 350-word response to the followingWhen thinki.docxannetnash8266
 
WRITE A 2-page paper on the following questions. Your answers must.docx
WRITE A 2-page paper on the following questions. Your answers must.docxWRITE A 2-page paper on the following questions. Your answers must.docx
WRITE A 2-page paper on the following questions. Your answers must.docxannetnash8266
 
Write a 1- to 2-page report for the Director of IT describing .docx
Write a 1- to 2-page report for the Director of IT describing .docxWrite a 1- to 2-page report for the Director of IT describing .docx
Write a 1- to 2-page report for the Director of IT describing .docxannetnash8266
 
Write a 1,400- to 2,100-word paper in which you assess criminal ju.docx
Write a 1,400- to 2,100-word paper in which you assess criminal ju.docxWrite a 1,400- to 2,100-word paper in which you assess criminal ju.docx
Write a 1,400- to 2,100-word paper in which you assess criminal ju.docxannetnash8266
 
Write a 1,750-word paper that includes the following(UNITED.docx
Write a 1,750-word paper that includes the following(UNITED.docxWrite a 1,750-word paper that includes the following(UNITED.docx
Write a 1,750-word paper that includes the following(UNITED.docxannetnash8266
 
Write a 1.400 to 1,700 word essay that summarizes your Week 4 .docx
Write a 1.400 to 1,700 word essay that summarizes your Week 4 .docxWrite a 1.400 to 1,700 word essay that summarizes your Week 4 .docx
Write a 1.400 to 1,700 word essay that summarizes your Week 4 .docxannetnash8266
 
Write a 1,400- to 1,750-word paper highlighting considerations for.docx
Write a 1,400- to 1,750-word paper highlighting considerations for.docxWrite a 1,400- to 1,750-word paper highlighting considerations for.docx
Write a 1,400- to 1,750-word paper highlighting considerations for.docxannetnash8266
 
Write a 1,050-word minimum strategic implementation plan in wh.docx
Write a 1,050-word minimum strategic implementation plan in wh.docxWrite a 1,050-word minimum strategic implementation plan in wh.docx
Write a 1,050-word minimum strategic implementation plan in wh.docxannetnash8266
 

More from annetnash8266 (20)

writea500-worddefinitioness.docx
writea500-worddefinitioness.docxwritea500-worddefinitioness.docx
writea500-worddefinitioness.docx
 
Writea minimum 300 word reflection in which you compare and.docx
Writea minimum 300 word reflection in which you compare and.docxWritea minimum 300 word reflection in which you compare and.docx
Writea minimum 300 word reflection in which you compare and.docx
 
Writea draft of the paper on case tools and include the followin.docx
Writea draft of the paper on case tools and include the followin.docxWritea draft of the paper on case tools and include the followin.docx
Writea draft of the paper on case tools and include the followin.docx
 
Write  To complete the assignment, open the OUTLINE ATTACHMENT fi.docx
Write  To complete the assignment, open the OUTLINE ATTACHMENT fi.docxWrite  To complete the assignment, open the OUTLINE ATTACHMENT fi.docx
Write  To complete the assignment, open the OUTLINE ATTACHMENT fi.docx
 
Write your proposal based on the criterias listed below Pr.docx
Write your proposal based on the criterias listed below Pr.docxWrite your proposal based on the criterias listed below Pr.docx
Write your proposal based on the criterias listed below Pr.docx
 
Write a 350- to no more than 700-word paper using APA format.D.docx
Write a 350- to no more than 700-word paper using APA format.D.docxWrite a 350- to no more than 700-word paper using APA format.D.docx
Write a 350- to no more than 700-word paper using APA format.D.docx
 
Write a 350- to 700-word paper in which you investigate the interr.docx
Write a 350- to 700-word paper in which you investigate the interr.docxWrite a 350- to 700-word paper in which you investigate the interr.docx
Write a 350- to 700-word paper in which you investigate the interr.docx
 
Write a 350 word analysis about juvenile attitudes toward poli.docx
Write a 350 word analysis about juvenile attitudes toward poli.docxWrite a 350 word analysis about juvenile attitudes toward poli.docx
Write a 350 word analysis about juvenile attitudes toward poli.docx
 
Write a 350- to 700-word paper in which you do the followingExp.docx
Write a 350- to 700-word paper in which you do the followingExp.docxWrite a 350- to 700-word paper in which you do the followingExp.docx
Write a 350- to 700-word paper in which you do the followingExp.docx
 
Write a 350- to 700- word response to the following questionsHo.docx
Write a 350- to 700- word response to the following questionsHo.docxWrite a 350- to 700- word response to the following questionsHo.docx
Write a 350- to 700- word response to the following questionsHo.docx
 
Write a 1,400- to 1,750 word APA format paper regarding a so.docx
Write a 1,400- to 1,750 word APA format paper regarding a so.docxWrite a 1,400- to 1,750 word APA format paper regarding a so.docx
Write a 1,400- to 1,750 word APA format paper regarding a so.docx
 
Write a 350- to 500-word summary in which you answer the following.docx
Write a 350- to 500-word summary in which you answer the following.docxWrite a 350- to 500-word summary in which you answer the following.docx
Write a 350- to 500-word summary in which you answer the following.docx
 
Write a 300- to 350-word response to the followingWhen thinki.docx
Write a 300- to 350-word response to the followingWhen thinki.docxWrite a 300- to 350-word response to the followingWhen thinki.docx
Write a 300- to 350-word response to the followingWhen thinki.docx
 
WRITE A 2-page paper on the following questions. Your answers must.docx
WRITE A 2-page paper on the following questions. Your answers must.docxWRITE A 2-page paper on the following questions. Your answers must.docx
WRITE A 2-page paper on the following questions. Your answers must.docx
 
Write a 1- to 2-page report for the Director of IT describing .docx
Write a 1- to 2-page report for the Director of IT describing .docxWrite a 1- to 2-page report for the Director of IT describing .docx
Write a 1- to 2-page report for the Director of IT describing .docx
 
Write a 1,400- to 2,100-word paper in which you assess criminal ju.docx
Write a 1,400- to 2,100-word paper in which you assess criminal ju.docxWrite a 1,400- to 2,100-word paper in which you assess criminal ju.docx
Write a 1,400- to 2,100-word paper in which you assess criminal ju.docx
 
Write a 1,750-word paper that includes the following(UNITED.docx
Write a 1,750-word paper that includes the following(UNITED.docxWrite a 1,750-word paper that includes the following(UNITED.docx
Write a 1,750-word paper that includes the following(UNITED.docx
 
Write a 1.400 to 1,700 word essay that summarizes your Week 4 .docx
Write a 1.400 to 1,700 word essay that summarizes your Week 4 .docxWrite a 1.400 to 1,700 word essay that summarizes your Week 4 .docx
Write a 1.400 to 1,700 word essay that summarizes your Week 4 .docx
 
Write a 1,400- to 1,750-word paper highlighting considerations for.docx
Write a 1,400- to 1,750-word paper highlighting considerations for.docxWrite a 1,400- to 1,750-word paper highlighting considerations for.docx
Write a 1,400- to 1,750-word paper highlighting considerations for.docx
 
Write a 1,050-word minimum strategic implementation plan in wh.docx
Write a 1,050-word minimum strategic implementation plan in wh.docxWrite a 1,050-word minimum strategic implementation plan in wh.docx
Write a 1,050-word minimum strategic implementation plan in wh.docx
 

Recently uploaded

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 

Recently uploaded (20)

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 

Write the program that reads two numbers from the keyboard. It.docx

  • 1. Write the program that reads two numbers from the keyboard. It then calculates and print the sum, product, difference of the two numbers including the two numbers entered. The program should prompt the user to continue or exit. If the user enters a (Y/y) then the program prompts the user to enter two numbers else the program exit. If the sum of the two numbers is an even number then multiply the sum by 2.5 and print the new result. If product of the two numbers is not an even number, then multiply the product by 2 and print the new result. The program must also print the two numbers entered. If difference of the two numbers (number 1 – number 2) is a negative number then add 10 to the difference of the numbers and print the new result. 2. Write a program that prints the number series from 1 to a user-specified limit in the form of a rectangle. Please see example below. Please enter a number between 1 and 9: 6
  • 2. Result: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 3. Write a program that prompts the user to input two numbers, the multiplicand (which is the number to be multiplied or repeated), and the maximum multiplier (which is the number by which it is to be multiplied (repeat count). The program should print the multiplication table of the multiplicand from 1 up to the multiplier. For example, if the user enters 10 (multiplier) and 5 multiplicand then the program should print as follows: 1 x 5 = 5
  • 3. 2 x 5 = 10 3 x 5 = 15 4 x 5 = 20 5 x 5 = 25 6 x 5 = 30 7 x 5 = 35 8 x 5 = 40 9 x 5 = 45 10 x 5 = 50