SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Please write the solution in the c++ language
Write a program that reads six wall lengths, one room height, and prints out the total wall area.
Useful for determining how much paint to buy to cover a room, or how much building materials
to buy.
+-----+
|Â Â Â Â |
|Â Â +-+
|Â Â |
+---+
Solution
#include <iostream>
using namespace std;
int main() {
int walls[6];
int height;
int total=0;
for(int i=0;i<6;i++)
{
cout<<" Enter Wall "<<i+1<<" length: ";
cin>>walls[i];
}
cout<<" Enter Room Height: ";
cin>>height;
cout<<" ";
for(int i=0;i<6;i++)
{
cout<<" Area of Wall "<<i+1<<" is: "<<walls[i]*height;
total+=walls[i]*height;
}
cout<<"  Total Area is: "<<total;
return 0;
}
output:
Enter Wall 1 length: 10
Enter Wall 2 length: 20
Enter Wall 3 length: 10
Enter Wall 4 length: 20
Enter Wall 5 length: 30
Enter Wall 6 length: 20
Enter Room Height: 20
Area of Wall 1 is: 200
Area of Wall 2 is: 400
Area of Wall 3 is: 200
Area of Wall 4 is: 400
Area of Wall 5 is: 600
Area of Wall 6 is: 400
Total Area is: 2200
RUN SUCCESSFUL (total time: 13s)

Weitere ähnliche Inhalte

Ähnlich wie Please write the solution in the c++ language Write a program that rea.docx

Chapter 7 - Input Output Statements in C++
Chapter 7 - Input Output Statements in C++Chapter 7 - Input Output Statements in C++
Chapter 7 - Input Output Statements in C++Deepak Singh
 
C++ L03-Control Structure
C++ L03-Control StructureC++ L03-Control Structure
C++ L03-Control StructureMohammad Shaker
 
Assignement of programming & problem solving
Assignement of programming & problem solvingAssignement of programming & problem solving
Assignement of programming & problem solvingSyed Umair
 
clc02_cpp_presentation_edit3 (1) 1.pptx
clc02_cpp_presentation_edit3 (1) 1.pptxclc02_cpp_presentation_edit3 (1) 1.pptx
clc02_cpp_presentation_edit3 (1) 1.pptxjminrin0212
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...ANUSUYA S
 
ma project
ma projectma project
ma projectAisu
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptJoshCasas1
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptUdhayaKumar175069
 
Survey of programming language getting started in C
Survey of programming language getting started in CSurvey of programming language getting started in C
Survey of programming language getting started in Cummeafruz
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functionsray143eddie
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptAlefya1
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ toolAbdullah Jan
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptxShimoFcis
 
Array and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptxArray and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptxJumanneChiyanda
 
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdfC++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdfaassecuritysystem
 

Ähnlich wie Please write the solution in the c++ language Write a program that rea.docx (20)

Chapter 7 - Input Output Statements in C++
Chapter 7 - Input Output Statements in C++Chapter 7 - Input Output Statements in C++
Chapter 7 - Input Output Statements in C++
 
C++ L03-Control Structure
C++ L03-Control StructureC++ L03-Control Structure
C++ L03-Control Structure
 
Assignement of programming & problem solving
Assignement of programming & problem solvingAssignement of programming & problem solving
Assignement of programming & problem solving
 
clc02_cpp_presentation_edit3 (1) 1.pptx
clc02_cpp_presentation_edit3 (1) 1.pptxclc02_cpp_presentation_edit3 (1) 1.pptx
clc02_cpp_presentation_edit3 (1) 1.pptx
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
 
ma project
ma projectma project
ma project
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
Survey of programming language getting started in C
Survey of programming language getting started in CSurvey of programming language getting started in C
Survey of programming language getting started in C
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
C++ TUTORIAL 2
C++ TUTORIAL 2C++ TUTORIAL 2
C++ TUTORIAL 2
 
Project in programming
Project in programmingProject in programming
Project in programming
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptx
 
Array and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptxArray and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptx
 
Cs project
Cs projectCs project
Cs project
 
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdfC++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
C++ Language -- Dynamic Memory -- There are 7 files in this project- a.pdf
 
Bijender (1)
Bijender (1)Bijender (1)
Bijender (1)
 
C++ L01-Variables
C++ L01-VariablesC++ L01-Variables
C++ L01-Variables
 

Mehr von helenc18

The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docxThe total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docxhelenc18
 
The Tinsley Company exchanged land that it had been holding for future.docx
The Tinsley Company exchanged land that it had been holding for future.docxThe Tinsley Company exchanged land that it had been holding for future.docx
The Tinsley Company exchanged land that it had been holding for future.docxhelenc18
 
The State of Rhode Island publishes its budget and the various support.docx
The State of Rhode Island publishes its budget and the various support.docxThe State of Rhode Island publishes its budget and the various support.docx
The State of Rhode Island publishes its budget and the various support.docxhelenc18
 
The SRLY rules for consolidated tax returns are designed to keep corpo.docx
The SRLY rules for consolidated tax returns are designed to keep corpo.docxThe SRLY rules for consolidated tax returns are designed to keep corpo.docx
The SRLY rules for consolidated tax returns are designed to keep corpo.docxhelenc18
 
The sound strikes the cantina walls and bounces off at the same angle.docx
The sound strikes the cantina walls and bounces off at the same angle.docxThe sound strikes the cantina walls and bounces off at the same angle.docx
The sound strikes the cantina walls and bounces off at the same angle.docxhelenc18
 
The six platforms below are initially at rest in deep space- The indic.docx
The six platforms below are initially at rest in deep space- The indic.docxThe six platforms below are initially at rest in deep space- The indic.docx
The six platforms below are initially at rest in deep space- The indic.docxhelenc18
 
The rise of various digital communication methods in the past decade h.docx
The rise of various digital communication methods in the past decade h.docxThe rise of various digital communication methods in the past decade h.docx
The rise of various digital communication methods in the past decade h.docxhelenc18
 
The reason that the increase in population growth in the 19th and 20th.docx
The reason that the increase in population growth in the 19th and 20th.docxThe reason that the increase in population growth in the 19th and 20th.docx
The reason that the increase in population growth in the 19th and 20th.docxhelenc18
 
The sale of stock and the sale of bonds are reported as financing acti.docx
The sale of stock and the sale of bonds are reported as financing acti.docxThe sale of stock and the sale of bonds are reported as financing acti.docx
The sale of stock and the sale of bonds are reported as financing acti.docxhelenc18
 
Precipitation volumetric analysis involves formation reactions of solu.docx
Precipitation volumetric analysis involves formation reactions of solu.docxPrecipitation volumetric analysis involves formation reactions of solu.docx
Precipitation volumetric analysis involves formation reactions of solu.docxhelenc18
 
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docxPOST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docxhelenc18
 
Portman Corporation has retained earnings of $675-000 at January 1- 20.docx
Portman Corporation has retained earnings of $675-000 at January 1- 20.docxPortman Corporation has retained earnings of $675-000 at January 1- 20.docx
Portman Corporation has retained earnings of $675-000 at January 1- 20.docxhelenc18
 
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docxPlease write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docxhelenc18
 
please write carefully and explain clearly- Thank you-SolutionKsp of C.docx
please write carefully and explain clearly- Thank you-SolutionKsp of C.docxplease write carefully and explain clearly- Thank you-SolutionKsp of C.docx
please write carefully and explain clearly- Thank you-SolutionKsp of C.docxhelenc18
 
Prioritize the three themes of integrated solid waste management- 1^st.docx
Prioritize the three themes of integrated solid waste management- 1^st.docxPrioritize the three themes of integrated solid waste management- 1^st.docx
Prioritize the three themes of integrated solid waste management- 1^st.docxhelenc18
 
present synchronized savage code while (1) { getServingFromPot ()- ea.docx
present synchronized savage code while (1) {  getServingFromPot ()- ea.docxpresent synchronized savage code while (1) {  getServingFromPot ()- ea.docx
present synchronized savage code while (1) { getServingFromPot ()- ea.docxhelenc18
 
Prepare general journal entries to record the following transactions f.docx
Prepare general journal entries to record the following transactions f.docxPrepare general journal entries to record the following transactions f.docx
Prepare general journal entries to record the following transactions f.docxhelenc18
 
Prepare functional specifications for the company-'s use of the Web an.docx
Prepare functional specifications for the company-'s use of the Web an.docxPrepare functional specifications for the company-'s use of the Web an.docx
Prepare functional specifications for the company-'s use of the Web an.docxhelenc18
 
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docxPrepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docxhelenc18
 

Mehr von helenc18 (19)

The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docxThe total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
The total electromagnetic power emitted by the sun is 3-8 x 1026 W- Th.docx
 
The Tinsley Company exchanged land that it had been holding for future.docx
The Tinsley Company exchanged land that it had been holding for future.docxThe Tinsley Company exchanged land that it had been holding for future.docx
The Tinsley Company exchanged land that it had been holding for future.docx
 
The State of Rhode Island publishes its budget and the various support.docx
The State of Rhode Island publishes its budget and the various support.docxThe State of Rhode Island publishes its budget and the various support.docx
The State of Rhode Island publishes its budget and the various support.docx
 
The SRLY rules for consolidated tax returns are designed to keep corpo.docx
The SRLY rules for consolidated tax returns are designed to keep corpo.docxThe SRLY rules for consolidated tax returns are designed to keep corpo.docx
The SRLY rules for consolidated tax returns are designed to keep corpo.docx
 
The sound strikes the cantina walls and bounces off at the same angle.docx
The sound strikes the cantina walls and bounces off at the same angle.docxThe sound strikes the cantina walls and bounces off at the same angle.docx
The sound strikes the cantina walls and bounces off at the same angle.docx
 
The six platforms below are initially at rest in deep space- The indic.docx
The six platforms below are initially at rest in deep space- The indic.docxThe six platforms below are initially at rest in deep space- The indic.docx
The six platforms below are initially at rest in deep space- The indic.docx
 
The rise of various digital communication methods in the past decade h.docx
The rise of various digital communication methods in the past decade h.docxThe rise of various digital communication methods in the past decade h.docx
The rise of various digital communication methods in the past decade h.docx
 
The reason that the increase in population growth in the 19th and 20th.docx
The reason that the increase in population growth in the 19th and 20th.docxThe reason that the increase in population growth in the 19th and 20th.docx
The reason that the increase in population growth in the 19th and 20th.docx
 
The sale of stock and the sale of bonds are reported as financing acti.docx
The sale of stock and the sale of bonds are reported as financing acti.docxThe sale of stock and the sale of bonds are reported as financing acti.docx
The sale of stock and the sale of bonds are reported as financing acti.docx
 
Precipitation volumetric analysis involves formation reactions of solu.docx
Precipitation volumetric analysis involves formation reactions of solu.docxPrecipitation volumetric analysis involves formation reactions of solu.docx
Precipitation volumetric analysis involves formation reactions of solu.docx
 
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docxPOST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
POST-LAB QUESTIONS 1- Based on your observations- what aimilarities di.docx
 
Portman Corporation has retained earnings of $675-000 at January 1- 20.docx
Portman Corporation has retained earnings of $675-000 at January 1- 20.docxPortman Corporation has retained earnings of $675-000 at January 1- 20.docx
Portman Corporation has retained earnings of $675-000 at January 1- 20.docx
 
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docxPlease write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
Please write it in Microsoft Word- Not in handwritten form- I-'ll give.docx
 
please write carefully and explain clearly- Thank you-SolutionKsp of C.docx
please write carefully and explain clearly- Thank you-SolutionKsp of C.docxplease write carefully and explain clearly- Thank you-SolutionKsp of C.docx
please write carefully and explain clearly- Thank you-SolutionKsp of C.docx
 
Prioritize the three themes of integrated solid waste management- 1^st.docx
Prioritize the three themes of integrated solid waste management- 1^st.docxPrioritize the three themes of integrated solid waste management- 1^st.docx
Prioritize the three themes of integrated solid waste management- 1^st.docx
 
present synchronized savage code while (1) { getServingFromPot ()- ea.docx
present synchronized savage code while (1) {  getServingFromPot ()- ea.docxpresent synchronized savage code while (1) {  getServingFromPot ()- ea.docx
present synchronized savage code while (1) { getServingFromPot ()- ea.docx
 
Prepare general journal entries to record the following transactions f.docx
Prepare general journal entries to record the following transactions f.docxPrepare general journal entries to record the following transactions f.docx
Prepare general journal entries to record the following transactions f.docx
 
Prepare functional specifications for the company-'s use of the Web an.docx
Prepare functional specifications for the company-'s use of the Web an.docxPrepare functional specifications for the company-'s use of the Web an.docx
Prepare functional specifications for the company-'s use of the Web an.docx
 
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docxPrepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
Prepare a 3 to 5 paragraph briefing statement which explains the 3 mos.docx
 

Kürzlich hochgeladen

PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Kürzlich hochgeladen (20)

PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

Please write the solution in the c++ language Write a program that rea.docx

  • 1. Please write the solution in the c++ language Write a program that reads six wall lengths, one room height, and prints out the total wall area. Useful for determining how much paint to buy to cover a room, or how much building materials to buy. +-----+ |Â Â Â Â | |Â Â +-+ |Â Â | +---+ Solution #include <iostream> using namespace std; int main() { int walls[6]; int height; int total=0; for(int i=0;i<6;i++) { cout<<" Enter Wall "<<i+1<<" length: "; cin>>walls[i]; } cout<<" Enter Room Height: "; cin>>height; cout<<" "; for(int i=0;i<6;i++) { cout<<" Area of Wall "<<i+1<<" is: "<<walls[i]*height; total+=walls[i]*height; } cout<<" Total Area is: "<<total;
  • 2. return 0; } output: Enter Wall 1 length: 10 Enter Wall 2 length: 20 Enter Wall 3 length: 10 Enter Wall 4 length: 20 Enter Wall 5 length: 30 Enter Wall 6 length: 20 Enter Room Height: 20 Area of Wall 1 is: 200 Area of Wall 2 is: 400 Area of Wall 3 is: 200 Area of Wall 4 is: 400 Area of Wall 5 is: 600 Area of Wall 6 is: 400 Total Area is: 2200 RUN SUCCESSFUL (total time: 13s)