SlideShare a Scribd company logo
1 of 2
UNIVERSITI TUN HUSSEIN ONN MALAYSIA
                    FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING
                    BTI 10202: COMPUTER PROGRAMMING

 LAB 6: Control Structure –Part 3
 NAME     : ______________________________________                               MARK

 MATRICS NO.: ____________________ DATE : ________


Objective: Students will be able to write C program using combinations of control structure
technique.

Exercise 1:
An institute offers a course that prepares students for the licensing exam for real brokers.
Last year, several of the students who completed this course took the licensing examination.
Naturally, the institute wants to know how well its students did on the exam. You have been
asked to write a program to summarize the results. You have been given a list of these 15
students. From the list of result the program should able to segregate between pass and fail.
Students with test result between 0-39 will be mark as failed while 40-100 mark as passed.

Your program should analyze the results of the exam as follow:
1. Input each test result (i.e. 20, 55). Display the message “Enter result <no>” on the
    screen each time the program requests another test result.
2. Display a summary of the test results indicating the number of students who passed and
    the number of students who failed.
3. If more than 6 students failed in the exam, print message “Need teaching
    improvement!”

(Tips: pseudo-code given as following)

Declare result as floating number
Declare and Initialize pass to zero
Declare and Initialize fail to zero
Declare and Initialize student counter to one

While student counter is less than or equal to fifteen
    Label reenter
    Get result

    If result is smaller and equal to 100 and result is larger and equal to 40
          Add one to pass
       Add one to student counter




                                                                                                1
Else if result is smaller than 40 and result is larger and equal to 0
         Add one to fail
         Add one to student counter
 Else
         go to label reenter

Print the number of pass
Print the number of fail`

If more than 6 students failed
     Print “Need teaching improvement”

Re-write your program:




                                                                            2

More Related Content

Viewers also liked

Dti2143 lab sheet 7
Dti2143 lab sheet 7Dti2143 lab sheet 7
Dti2143 lab sheet 7alish sha
 
Lab 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012alish sha
 
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13alish sha
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13alish sha
 
What are the causes of conflicts (Bahasa Malaysia)
What are the causes of conflicts (Bahasa Malaysia)What are the causes of conflicts (Bahasa Malaysia)
What are the causes of conflicts (Bahasa Malaysia)alish sha
 

Viewers also liked (8)

Dti2143 lab sheet 7
Dti2143 lab sheet 7Dti2143 lab sheet 7
Dti2143 lab sheet 7
 
Chapter1 6
Chapter1 6Chapter1 6
Chapter1 6
 
Lab 6
Lab 6Lab 6
Lab 6
 
Lab sheet 1
Lab sheet 1Lab sheet 1
Lab sheet 1
 
Lab 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012
 
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13
 
What are the causes of conflicts (Bahasa Malaysia)
What are the causes of conflicts (Bahasa Malaysia)What are the causes of conflicts (Bahasa Malaysia)
What are the causes of conflicts (Bahasa Malaysia)
 

Similar to Lab 6 sem ii_11_12

Accn4 2121-accn4-w-ms-jun 12
Accn4 2121-accn4-w-ms-jun 12Accn4 2121-accn4-w-ms-jun 12
Accn4 2121-accn4-w-ms-jun 12Sam Catlin
 
CIS/115 CIS 115 CIS115 You Have Been Asked To Design A Program That Will Allo...
CIS/115 CIS 115 CIS115 You Have Been Asked To Design A Program That Will Allo...CIS/115 CIS 115 CIS115 You Have Been Asked To Design A Program That Will Allo...
CIS/115 CIS 115 CIS115 You Have Been Asked To Design A Program That Will Allo...itartist90
 
Cis 115 i lab 4 of 7
Cis 115 i lab 4 of 7Cis 115 i lab 4 of 7
Cis 115 i lab 4 of 7helpido9
 
AIHR_Measuring_Learning_Effectiveness.pdf
AIHR_Measuring_Learning_Effectiveness.pdfAIHR_Measuring_Learning_Effectiveness.pdf
AIHR_Measuring_Learning_Effectiveness.pdfYodhyPrabuJaya
 
Contemporary Marketing for Sustainability (CMS) SLIM 2017 June
Contemporary Marketing for Sustainability (CMS) SLIM 2017 JuneContemporary Marketing for Sustainability (CMS) SLIM 2017 June
Contemporary Marketing for Sustainability (CMS) SLIM 2017 JuneShehan Timothy Perera
 
Cis 115 i lab 4 of 7
Cis 115 i lab 4 of 7Cis 115 i lab 4 of 7
Cis 115 i lab 4 of 7comp274
 
College of administrative and financial sciences assignme
College of administrative and financial sciences assignmeCollege of administrative and financial sciences assignme
College of administrative and financial sciences assignmenand15
 
LSSGB_Project_SimpliLearn.ppt
LSSGB_Project_SimpliLearn.pptLSSGB_Project_SimpliLearn.ppt
LSSGB_Project_SimpliLearn.pptMash92
 
Covidien Dc Work Keys 101 2
Covidien Dc    Work Keys 101 2Covidien Dc    Work Keys 101 2
Covidien Dc Work Keys 101 2LauraAtACT
 
Sec ed esl fl_ts faculty instructional guide_revised 10.18.13
Sec ed esl fl_ts faculty instructional guide_revised 10.18.13Sec ed esl fl_ts faculty instructional guide_revised 10.18.13
Sec ed esl fl_ts faculty instructional guide_revised 10.18.13OPPA
 
Bil sped ts faculty instructional guide_revised 10.18.13
Bil sped ts faculty instructional guide_revised 10.18.13Bil sped ts faculty instructional guide_revised 10.18.13
Bil sped ts faculty instructional guide_revised 10.18.13OPPA
 
PPT on implementing Kirkpatrickk Model
PPT on implementing Kirkpatrickk ModelPPT on implementing Kirkpatrickk Model
PPT on implementing Kirkpatrickk ModelShobitash Jamwal
 
Devry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendarDevry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendarshyaminfo12
 
Devry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendarDevry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendarshamek1236
 
Ecse ts faculty instructional guide revised 10.18.13
Ecse ts faculty instructional guide revised 10.18.13Ecse ts faculty instructional guide revised 10.18.13
Ecse ts faculty instructional guide revised 10.18.13OPPA
 
Ed admin ts faculty instructional guide revised 10.18.13
Ed admin ts faculty instructional guide revised 10.18.13Ed admin ts faculty instructional guide revised 10.18.13
Ed admin ts faculty instructional guide revised 10.18.13OPPA
 
Devry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendarDevry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendareyavagal
 
Cebd ts faculty instructional guide revised 10.18.13
Cebd ts faculty instructional guide revised 10.18.13Cebd ts faculty instructional guide revised 10.18.13
Cebd ts faculty instructional guide revised 10.18.13OPPA
 

Similar to Lab 6 sem ii_11_12 (20)

Accn4 2121-accn4-w-ms-jun 12
Accn4 2121-accn4-w-ms-jun 12Accn4 2121-accn4-w-ms-jun 12
Accn4 2121-accn4-w-ms-jun 12
 
CIS/115 CIS 115 CIS115 You Have Been Asked To Design A Program That Will Allo...
CIS/115 CIS 115 CIS115 You Have Been Asked To Design A Program That Will Allo...CIS/115 CIS 115 CIS115 You Have Been Asked To Design A Program That Will Allo...
CIS/115 CIS 115 CIS115 You Have Been Asked To Design A Program That Will Allo...
 
Cis 115 i lab 4 of 7
Cis 115 i lab 4 of 7Cis 115 i lab 4 of 7
Cis 115 i lab 4 of 7
 
Statistics-1 : The Basics of Statistics
Statistics-1 : The Basics of StatisticsStatistics-1 : The Basics of Statistics
Statistics-1 : The Basics of Statistics
 
AIHR_Measuring_Learning_Effectiveness.pdf
AIHR_Measuring_Learning_Effectiveness.pdfAIHR_Measuring_Learning_Effectiveness.pdf
AIHR_Measuring_Learning_Effectiveness.pdf
 
Contemporary Marketing for Sustainability (CMS) SLIM 2017 June
Contemporary Marketing for Sustainability (CMS) SLIM 2017 JuneContemporary Marketing for Sustainability (CMS) SLIM 2017 June
Contemporary Marketing for Sustainability (CMS) SLIM 2017 June
 
Cis 115 i lab 4 of 7
Cis 115 i lab 4 of 7Cis 115 i lab 4 of 7
Cis 115 i lab 4 of 7
 
College of administrative and financial sciences assignme
College of administrative and financial sciences assignmeCollege of administrative and financial sciences assignme
College of administrative and financial sciences assignme
 
LSSGB_Project_SimpliLearn.ppt
LSSGB_Project_SimpliLearn.pptLSSGB_Project_SimpliLearn.ppt
LSSGB_Project_SimpliLearn.ppt
 
Cs 1114 - lecture-7
Cs 1114 - lecture-7Cs 1114 - lecture-7
Cs 1114 - lecture-7
 
Covidien Dc Work Keys 101 2
Covidien Dc    Work Keys 101 2Covidien Dc    Work Keys 101 2
Covidien Dc Work Keys 101 2
 
Sec ed esl fl_ts faculty instructional guide_revised 10.18.13
Sec ed esl fl_ts faculty instructional guide_revised 10.18.13Sec ed esl fl_ts faculty instructional guide_revised 10.18.13
Sec ed esl fl_ts faculty instructional guide_revised 10.18.13
 
Bil sped ts faculty instructional guide_revised 10.18.13
Bil sped ts faculty instructional guide_revised 10.18.13Bil sped ts faculty instructional guide_revised 10.18.13
Bil sped ts faculty instructional guide_revised 10.18.13
 
PPT on implementing Kirkpatrickk Model
PPT on implementing Kirkpatrickk ModelPPT on implementing Kirkpatrickk Model
PPT on implementing Kirkpatrickk Model
 
Devry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendarDevry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendar
 
Devry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendarDevry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendar
 
Ecse ts faculty instructional guide revised 10.18.13
Ecse ts faculty instructional guide revised 10.18.13Ecse ts faculty instructional guide revised 10.18.13
Ecse ts faculty instructional guide revised 10.18.13
 
Ed admin ts faculty instructional guide revised 10.18.13
Ed admin ts faculty instructional guide revised 10.18.13Ed admin ts faculty instructional guide revised 10.18.13
Ed admin ts faculty instructional guide revised 10.18.13
 
Devry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendarDevry cis 115 week 4 lab grade calendar
Devry cis 115 week 4 lab grade calendar
 
Cebd ts faculty instructional guide revised 10.18.13
Cebd ts faculty instructional guide revised 10.18.13Cebd ts faculty instructional guide revised 10.18.13
Cebd ts faculty instructional guide revised 10.18.13
 

More from alish sha

T22016 – how to answer with ubs 9
T22016 – how to answer with ubs 9T22016 – how to answer with ubs 9
T22016 – how to answer with ubs 9alish sha
 
July 2014 theory exam (theory)
July 2014 theory exam (theory)July 2014 theory exam (theory)
July 2014 theory exam (theory)alish sha
 
Accounting basic equation
Accounting basic equation Accounting basic equation
Accounting basic equation alish sha
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifahalish sha
 
It 302 computerized accounting (week 1) - sharifah
It 302   computerized accounting (week 1) - sharifahIt 302   computerized accounting (week 1) - sharifah
It 302 computerized accounting (week 1) - sharifahalish sha
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&aalish sha
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&aalish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Attn list test
Attn list testAttn list test
Attn list testalish sha
 
Carry markdam31303
Carry markdam31303Carry markdam31303
Carry markdam31303alish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Final project
Final projectFinal project
Final projectalish sha
 
Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8alish sha
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7alish sha
 
Dti2143 lab sheet 6
Dti2143 lab sheet 6Dti2143 lab sheet 6
Dti2143 lab sheet 6alish sha
 
Math hquickissential
Math hquickissentialMath hquickissential
Math hquickissentialalish sha
 
Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5alish sha
 
Dam31303 lab sheet 4
Dam31303 lab sheet 4Dam31303 lab sheet 4
Dam31303 lab sheet 4alish sha
 

More from alish sha (20)

T22016 – how to answer with ubs 9
T22016 – how to answer with ubs 9T22016 – how to answer with ubs 9
T22016 – how to answer with ubs 9
 
July 2014 theory exam (theory)
July 2014 theory exam (theory)July 2014 theory exam (theory)
July 2014 theory exam (theory)
 
Accounting basic equation
Accounting basic equation Accounting basic equation
Accounting basic equation
 
It 302 computerized accounting (week 2) - sharifah
It 302   computerized accounting (week 2) - sharifahIt 302   computerized accounting (week 2) - sharifah
It 302 computerized accounting (week 2) - sharifah
 
It 302 computerized accounting (week 1) - sharifah
It 302   computerized accounting (week 1) - sharifahIt 302   computerized accounting (week 1) - sharifah
It 302 computerized accounting (week 1) - sharifah
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&a
 
Test 1 skema q&a
Test 1 skema q&aTest 1 skema q&a
Test 1 skema q&a
 
Final project
Final projectFinal project
Final project
 
Final project
Final projectFinal project
Final project
 
Attn list test
Attn list testAttn list test
Attn list test
 
Carry markdam31303
Carry markdam31303Carry markdam31303
Carry markdam31303
 
Final project
Final projectFinal project
Final project
 
Final project
Final projectFinal project
Final project
 
Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
 
Dti2143 lab sheet 6
Dti2143 lab sheet 6Dti2143 lab sheet 6
Dti2143 lab sheet 6
 
Math hquickissential
Math hquickissentialMath hquickissential
Math hquickissential
 
Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5Dti2143 dam31303 lab sheet 5
Dti2143 dam31303 lab sheet 5
 
Rpp
RppRpp
Rpp
 
Dam31303 lab sheet 4
Dam31303 lab sheet 4Dam31303 lab sheet 4
Dam31303 lab sheet 4
 

Recently uploaded

Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
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
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsRommel Regala
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
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
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 

Recently uploaded (20)

Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
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
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
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
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 

Lab 6 sem ii_11_12

  • 1. UNIVERSITI TUN HUSSEIN ONN MALAYSIA FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING BTI 10202: COMPUTER PROGRAMMING LAB 6: Control Structure –Part 3 NAME : ______________________________________ MARK MATRICS NO.: ____________________ DATE : ________ Objective: Students will be able to write C program using combinations of control structure technique. Exercise 1: An institute offers a course that prepares students for the licensing exam for real brokers. Last year, several of the students who completed this course took the licensing examination. Naturally, the institute wants to know how well its students did on the exam. You have been asked to write a program to summarize the results. You have been given a list of these 15 students. From the list of result the program should able to segregate between pass and fail. Students with test result between 0-39 will be mark as failed while 40-100 mark as passed. Your program should analyze the results of the exam as follow: 1. Input each test result (i.e. 20, 55). Display the message “Enter result <no>” on the screen each time the program requests another test result. 2. Display a summary of the test results indicating the number of students who passed and the number of students who failed. 3. If more than 6 students failed in the exam, print message “Need teaching improvement!” (Tips: pseudo-code given as following) Declare result as floating number Declare and Initialize pass to zero Declare and Initialize fail to zero Declare and Initialize student counter to one While student counter is less than or equal to fifteen Label reenter Get result If result is smaller and equal to 100 and result is larger and equal to 40 Add one to pass Add one to student counter 1
  • 2. Else if result is smaller than 40 and result is larger and equal to 0 Add one to fail Add one to student counter Else go to label reenter Print the number of pass Print the number of fail` If more than 6 students failed Print “Need teaching improvement” Re-write your program: 2