SlideShare a Scribd company logo
1 of 2
Programs 1st term C++
1. Use while loop to print “Welcome to City University” 5 times?
2. Use while loop to print first 10 integers with tab space?
3. Modify task 2? Write program that takes an integer input & display
number till that integer?
4. Write program using whileLoop and display following result
Number Square Cube
1 1 1
2 4 16
3 9 27
4 16 64
5 25 125
6 36 216
5. Write a program using while loop that prints even number (from
number 0-100)
6. Modify program in task-4 and print first 50 odd numbers separately
and even numbers separately?
7. Modify task 5 and produce sum of first 50 odd numbers from(0-100)
and also produce sum of first 50 even numbers(0-100)?
8. Write a program that generate table of 2 using while loop?
9. Modify Task 7 take input from user and generate table for number
user has requested?
10. Modify task 8 take two inputs from user one for table & one for
multiple of table and produce results?
11. Write program that produce first 10 integers in descending
order?
12. Modify task10 to produce factorial of a number entered by
user?
13. Write a program that product following result
1 2 3 4
5 6 7 8
910 11 12
13 14 15 16

More Related Content

Viewers also liked

2ª reunión padres 3º orientación 14 15v3
2ª reunión padres 3º orientación 14 15v32ª reunión padres 3º orientación 14 15v3
2ª reunión padres 3º orientación 14 15v3montserratweb
 
Cleaners helps volunteers be belles of the ball _ TribLIVE
Cleaners helps volunteers be belles of the ball _ TribLIVECleaners helps volunteers be belles of the ball _ TribLIVE
Cleaners helps volunteers be belles of the ball _ TribLIVEHeather Ziccarelli
 
со мо 1 (1-p групп)
со мо 1  (1-p групп)со мо 1  (1-p групп)
со мо 1 (1-p групп)munkhchimeg2013
 
نضحك مع الضمائر
نضحك مع الضمائرنضحك مع الضمائر
نضحك مع الضمائرLoubnadakramanji
 
7 ошибок родителей
7 ошибок родителей7 ошибок родителей
7 ошибок родителейRebbit2015
 
Xbody triptico-latamiberica-definitivo
Xbody triptico-latamiberica-definitivoXbody triptico-latamiberica-definitivo
Xbody triptico-latamiberica-definitivoITALY COFFEE TEA STORE
 
الذات والدافعية
الذات والدافعيةالذات والدافعية
الذات والدافعيةAbdullah Ali
 
contoh perencanaan bisnis dasar manajemen tugas 1 Erry's Catering Management
contoh perencanaan bisnis dasar manajemen tugas 1 Erry's Catering Managementcontoh perencanaan bisnis dasar manajemen tugas 1 Erry's Catering Management
contoh perencanaan bisnis dasar manajemen tugas 1 Erry's Catering ManagementErry Novita Sari
 

Viewers also liked (11)

2ª reunión padres 3º orientación 14 15v3
2ª reunión padres 3º orientación 14 15v32ª reunión padres 3º orientación 14 15v3
2ª reunión padres 3º orientación 14 15v3
 
Cleaners helps volunteers be belles of the ball _ TribLIVE
Cleaners helps volunteers be belles of the ball _ TribLIVECleaners helps volunteers be belles of the ball _ TribLIVE
Cleaners helps volunteers be belles of the ball _ TribLIVE
 
со мо 1 (1-p групп)
со мо 1  (1-p групп)со мо 1  (1-p групп)
со мо 1 (1-p групп)
 
نضحك مع الضمائر
نضحك مع الضمائرنضحك مع الضمائر
نضحك مع الضمائر
 
7 ошибок родителей
7 ошибок родителей7 ошибок родителей
7 ошибок родителей
 
business plan
business plan business plan
business plan
 
How to success
How to success How to success
How to success
 
Xbody triptico-latamiberica-definitivo
Xbody triptico-latamiberica-definitivoXbody triptico-latamiberica-definitivo
Xbody triptico-latamiberica-definitivo
 
الذات والدافعية
الذات والدافعيةالذات والدافعية
الذات والدافعية
 
CDMA PARAMETER
CDMA PARAMETERCDMA PARAMETER
CDMA PARAMETER
 
contoh perencanaan bisnis dasar manajemen tugas 1 Erry's Catering Management
contoh perencanaan bisnis dasar manajemen tugas 1 Erry's Catering Managementcontoh perencanaan bisnis dasar manajemen tugas 1 Erry's Catering Management
contoh perencanaan bisnis dasar manajemen tugas 1 Erry's Catering Management
 

Similar to Loops in C++

c++ Question
c++  Questionc++  Question
c++ QuestionHamza4467
 
Year 2 dsa c++ exercises on user defined functions
Year 2 dsa  c++ exercises on user defined functionsYear 2 dsa  c++ exercises on user defined functions
Year 2 dsa c++ exercises on user defined functionsErnesteNtezirizaza
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxAASTHA76
 
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxLab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxABDULAHAD507571
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab neweyavagal
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newLast7693
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newscottbrownnn
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy BookAbir Hossain
 
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docxCMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docxclarebernice
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01Drjilesh
 
csharp repitition structures
csharp repitition structurescsharp repitition structures
csharp repitition structuresMicheal Ogundero
 
C programming session 04
C programming session 04C programming session 04
C programming session 04Vivek Singh
 
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Alpro
 
Programada chapter 4
Programada chapter 4Programada chapter 4
Programada chapter 4abdallaisse
 

Similar to Loops in C++ (20)

c++ Question
c++  Questionc++  Question
c++ Question
 
Java Practice Set
Java Practice SetJava Practice Set
Java Practice Set
 
Programming Fundamental handouts
Programming Fundamental handoutsProgramming Fundamental handouts
Programming Fundamental handouts
 
Year 2 dsa c++ exercises on user defined functions
Year 2 dsa  c++ exercises on user defined functionsYear 2 dsa  c++ exercises on user defined functions
Year 2 dsa c++ exercises on user defined functions
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
 
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxLab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docxCMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
Assignment 3
Assignment 3Assignment 3
Assignment 3
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01
 
csharp repitition structures
csharp repitition structurescsharp repitition structures
csharp repitition structures
 
Exercises
ExercisesExercises
Exercises
 
C programming session 04
C programming session 04C programming session 04
C programming session 04
 
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
 
Programada chapter 4
Programada chapter 4Programada chapter 4
Programada chapter 4
 
UNIT I.pptx
UNIT I.pptxUNIT I.pptx
UNIT I.pptx
 

Recently uploaded

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
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
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
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🔝
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
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
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

Loops in C++

  • 1. Programs 1st term C++ 1. Use while loop to print “Welcome to City University” 5 times? 2. Use while loop to print first 10 integers with tab space? 3. Modify task 2? Write program that takes an integer input & display number till that integer? 4. Write program using whileLoop and display following result Number Square Cube 1 1 1 2 4 16 3 9 27 4 16 64 5 25 125 6 36 216 5. Write a program using while loop that prints even number (from number 0-100) 6. Modify program in task-4 and print first 50 odd numbers separately and even numbers separately?
  • 2. 7. Modify task 5 and produce sum of first 50 odd numbers from(0-100) and also produce sum of first 50 even numbers(0-100)? 8. Write a program that generate table of 2 using while loop? 9. Modify Task 7 take input from user and generate table for number user has requested? 10. Modify task 8 take two inputs from user one for table & one for multiple of table and produce results? 11. Write program that produce first 10 integers in descending order? 12. Modify task10 to produce factorial of a number entered by user? 13. Write a program that product following result 1 2 3 4 5 6 7 8 910 11 12 13 14 15 16