SlideShare a Scribd company logo
1 of 1
Download to read offline
1. Exercises: (C++) a. Write a while loop that will ask the user to enter 10 names b. Write a while
loop that will ask the user to enter names and stop when "xx" is entered c. Write a while loop that
will print the numbers from 50 to 100 d. Write a while loop that will continue asking the user to
enter numbers, find and print the average of these numbers until the number 999 is entered e.
Write a for loop that will print the sum of the numbers 40 to 80 f. Write a for loop that will print the
numbers 15 to 25 g. Write a for loop that will print the numbers 25 to 1 h. Write a for loop that will
print the numbers 5,10,15,20,25,30,35,40,45,50 i. Write a do ... while loop to enter 10 grades and
find the average of them j. Write a do ... while loop to enter any number of grades and find the
average of them

More Related Content

More from adeshpawar234

1 Describe a government intervention to help the economy th.pdf
1 Describe a government intervention to help the economy th.pdf1 Describe a government intervention to help the economy th.pdf
1 Describe a government intervention to help the economy th.pdfadeshpawar234
 
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
1 Create a Drawer Menu with 3 menu items2 When you click t.pdfadeshpawar234
 
1 Cules son las tres fases de la Orogenia Cordillerana.pdf
1 Cules son las tres fases de la Orogenia Cordillerana.pdf1 Cules son las tres fases de la Orogenia Cordillerana.pdf
1 Cules son las tres fases de la Orogenia Cordillerana.pdfadeshpawar234
 
1 Create a list exploring an area of your daily life and in.pdf
1 Create a list exploring an area of your daily life and in.pdf1 Create a list exploring an area of your daily life and in.pdf
1 Create a list exploring an area of your daily life and in.pdfadeshpawar234
 
1 Define what is species extinction When do we say that a .pdf
1 Define what is species extinction When do we say that a .pdf1 Define what is species extinction When do we say that a .pdf
1 Define what is species extinction When do we say that a .pdfadeshpawar234
 
1 Define what constitutes abuse maltreatment and neg.pdf
1 Define what constitutes abuse maltreatment and neg.pdf1 Define what constitutes abuse maltreatment and neg.pdf
1 Define what constitutes abuse maltreatment and neg.pdfadeshpawar234
 
1 Describe an E test plastic strip How are they placed on.pdf
1 Describe an E test plastic strip  How are they placed on.pdf1 Describe an E test plastic strip  How are they placed on.pdf
1 Describe an E test plastic strip How are they placed on.pdfadeshpawar234
 
1 El valor presente de una empresa de acuerdo con DCF est .pdf
1 El valor presente de una empresa de acuerdo con DCF est .pdf1 El valor presente de una empresa de acuerdo con DCF est .pdf
1 El valor presente de una empresa de acuerdo con DCF est .pdfadeshpawar234
 
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdfadeshpawar234
 
1 Fill the missing parts in this C code snippet begintabu.pdf
1 Fill the missing parts in this C code snippet begintabu.pdf1 Fill the missing parts in this C code snippet begintabu.pdf
1 Fill the missing parts in this C code snippet begintabu.pdfadeshpawar234
 
1 Fill out the deviation blanks dev 2 Calculate the Va.pdf
1 Fill out the deviation blanks dev  2 Calculate the Va.pdf1 Fill out the deviation blanks dev  2 Calculate the Va.pdf
1 Fill out the deviation blanks dev 2 Calculate the Va.pdfadeshpawar234
 
1 Explain what antbiouc resistance is Be sure to inchade s.pdf
1 Explain what antbiouc resistance is Be sure to inchade s.pdf1 Explain what antbiouc resistance is Be sure to inchade s.pdf
1 Explain what antbiouc resistance is Be sure to inchade s.pdfadeshpawar234
 
1 Fertilizers applied to fields and crops contain nutrients.pdf
1 Fertilizers applied to fields and crops contain nutrients.pdf1 Fertilizers applied to fields and crops contain nutrients.pdf
1 Fertilizers applied to fields and crops contain nutrients.pdfadeshpawar234
 
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdfadeshpawar234
 
1 Explain the Asset Collaboration and Communication Softwar.pdf
1 Explain the Asset Collaboration and Communication Softwar.pdf1 Explain the Asset Collaboration and Communication Softwar.pdf
1 Explain the Asset Collaboration and Communication Softwar.pdfadeshpawar234
 
1 Explain the different types of flash memory NOR NAND et.pdf
1 Explain the different types of flash memory NOR NAND et.pdf1 Explain the different types of flash memory NOR NAND et.pdf
1 Explain the different types of flash memory NOR NAND et.pdfadeshpawar234
 
1 Explique cmo la tierra adquiri su estructura en capas .pdf
1 Explique cmo la tierra adquiri su estructura en capas .pdf1 Explique cmo la tierra adquiri su estructura en capas .pdf
1 Explique cmo la tierra adquiri su estructura en capas .pdfadeshpawar234
 
1 Explain how you can determine when a patients health or .pdf
1 Explain how you can determine when a patients health or .pdf1 Explain how you can determine when a patients health or .pdf
1 Explain how you can determine when a patients health or .pdfadeshpawar234
 
1 Explain technologies that lead to enhanced decisionmakin.pdf
1 Explain technologies that lead to enhanced decisionmakin.pdf1 Explain technologies that lead to enhanced decisionmakin.pdf
1 Explain technologies that lead to enhanced decisionmakin.pdfadeshpawar234
 
1 Could a cyber attack cause an electrical blackout a Yes.pdf
1 Could a cyber attack cause an electrical blackout a Yes.pdf1 Could a cyber attack cause an electrical blackout a Yes.pdf
1 Could a cyber attack cause an electrical blackout a Yes.pdfadeshpawar234
 

More from adeshpawar234 (20)

1 Describe a government intervention to help the economy th.pdf
1 Describe a government intervention to help the economy th.pdf1 Describe a government intervention to help the economy th.pdf
1 Describe a government intervention to help the economy th.pdf
 
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
1 Create a Drawer Menu with 3 menu items2 When you click t.pdf
 
1 Cules son las tres fases de la Orogenia Cordillerana.pdf
1 Cules son las tres fases de la Orogenia Cordillerana.pdf1 Cules son las tres fases de la Orogenia Cordillerana.pdf
1 Cules son las tres fases de la Orogenia Cordillerana.pdf
 
1 Create a list exploring an area of your daily life and in.pdf
1 Create a list exploring an area of your daily life and in.pdf1 Create a list exploring an area of your daily life and in.pdf
1 Create a list exploring an area of your daily life and in.pdf
 
1 Define what is species extinction When do we say that a .pdf
1 Define what is species extinction When do we say that a .pdf1 Define what is species extinction When do we say that a .pdf
1 Define what is species extinction When do we say that a .pdf
 
1 Define what constitutes abuse maltreatment and neg.pdf
1 Define what constitutes abuse maltreatment and neg.pdf1 Define what constitutes abuse maltreatment and neg.pdf
1 Define what constitutes abuse maltreatment and neg.pdf
 
1 Describe an E test plastic strip How are they placed on.pdf
1 Describe an E test plastic strip  How are they placed on.pdf1 Describe an E test plastic strip  How are they placed on.pdf
1 Describe an E test plastic strip How are they placed on.pdf
 
1 El valor presente de una empresa de acuerdo con DCF est .pdf
1 El valor presente de una empresa de acuerdo con DCF est .pdf1 El valor presente de una empresa de acuerdo con DCF est .pdf
1 El valor presente de una empresa de acuerdo con DCF est .pdf
 
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
1 Cul de las siguientes afirmaciones sobre cultura y lide.pdf
 
1 Fill the missing parts in this C code snippet begintabu.pdf
1 Fill the missing parts in this C code snippet begintabu.pdf1 Fill the missing parts in this C code snippet begintabu.pdf
1 Fill the missing parts in this C code snippet begintabu.pdf
 
1 Fill out the deviation blanks dev 2 Calculate the Va.pdf
1 Fill out the deviation blanks dev  2 Calculate the Va.pdf1 Fill out the deviation blanks dev  2 Calculate the Va.pdf
1 Fill out the deviation blanks dev 2 Calculate the Va.pdf
 
1 Explain what antbiouc resistance is Be sure to inchade s.pdf
1 Explain what antbiouc resistance is Be sure to inchade s.pdf1 Explain what antbiouc resistance is Be sure to inchade s.pdf
1 Explain what antbiouc resistance is Be sure to inchade s.pdf
 
1 Fertilizers applied to fields and crops contain nutrients.pdf
1 Fertilizers applied to fields and crops contain nutrients.pdf1 Fertilizers applied to fields and crops contain nutrients.pdf
1 Fertilizers applied to fields and crops contain nutrients.pdf
 
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
1 fenol krmzsnn amac nedir n varln oksijenin varln pH de.pdf
 
1 Explain the Asset Collaboration and Communication Softwar.pdf
1 Explain the Asset Collaboration and Communication Softwar.pdf1 Explain the Asset Collaboration and Communication Softwar.pdf
1 Explain the Asset Collaboration and Communication Softwar.pdf
 
1 Explain the different types of flash memory NOR NAND et.pdf
1 Explain the different types of flash memory NOR NAND et.pdf1 Explain the different types of flash memory NOR NAND et.pdf
1 Explain the different types of flash memory NOR NAND et.pdf
 
1 Explique cmo la tierra adquiri su estructura en capas .pdf
1 Explique cmo la tierra adquiri su estructura en capas .pdf1 Explique cmo la tierra adquiri su estructura en capas .pdf
1 Explique cmo la tierra adquiri su estructura en capas .pdf
 
1 Explain how you can determine when a patients health or .pdf
1 Explain how you can determine when a patients health or .pdf1 Explain how you can determine when a patients health or .pdf
1 Explain how you can determine when a patients health or .pdf
 
1 Explain technologies that lead to enhanced decisionmakin.pdf
1 Explain technologies that lead to enhanced decisionmakin.pdf1 Explain technologies that lead to enhanced decisionmakin.pdf
1 Explain technologies that lead to enhanced decisionmakin.pdf
 
1 Could a cyber attack cause an electrical blackout a Yes.pdf
1 Could a cyber attack cause an electrical blackout a Yes.pdf1 Could a cyber attack cause an electrical blackout a Yes.pdf
1 Could a cyber attack cause an electrical blackout a Yes.pdf
 

Recently uploaded

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
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
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 

Recently uploaded (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
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
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 

C++ Exercises: Loops to Enter Data and Perform Calculations

  • 1. 1. Exercises: (C++) a. Write a while loop that will ask the user to enter 10 names b. Write a while loop that will ask the user to enter names and stop when "xx" is entered c. Write a while loop that will print the numbers from 50 to 100 d. Write a while loop that will continue asking the user to enter numbers, find and print the average of these numbers until the number 999 is entered e. Write a for loop that will print the sum of the numbers 40 to 80 f. Write a for loop that will print the numbers 15 to 25 g. Write a for loop that will print the numbers 25 to 1 h. Write a for loop that will print the numbers 5,10,15,20,25,30,35,40,45,50 i. Write a do ... while loop to enter 10 grades and find the average of them j. Write a do ... while loop to enter any number of grades and find the average of them