SlideShare une entreprise Scribd logo
1  sur  3
left0UNIVERSITI TUN HUSSEIN ONN MALAYSIA<br />FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING <br />DAM31303/DTI 2143: COMPUTER PROGRAMMING<br />LAB EXERCISE 6:  SELECTION & LOOP <br />Exercise 1:<br />,[object Object],#include<stdio.h><br />#include<conio.h><br />int main()<br />{<br />    double price1, price2 ,price3,price4, price5, price6, price7, totalprice=0;<br />    printf(quot;
Program to calculate the average and total price of the 7 itemsquot;
);<br />    printf(quot;
 Enter price of item: RMquot;
);<br />    scanf(quot;
%lfquot;
, &price1);<br />    totalprice +=price1;<br />    printf(quot;
 Enter price of item: RMquot;
);<br />    scanf(quot;
%lfquot;
, &price2);<br />    totalprice +=price2;<br />     printf(quot;
 Enter price of item: RMquot;
);<br />    scanf(quot;
%lfquot;
, &price3);<br />    totalprice +=price3;<br />     printf(quot;
 Enter price of item : RMquot;
);<br />    scanf(quot;
%lfquot;
, &price4);<br />    totalprice +=price4;<br />     printf(quot;
 Enter price of item : RMquot;
);<br />    scanf(quot;
%lfquot;
, &price5);<br />    totalprice +=price5;<br />     printf(quot;
 Enter price of item : RMquot;
);<br />    scanf(quot;
%lfquot;
, &price6);<br />    totalprice +=price6;<br />     printf(quot;
 Enter price of item : RMquot;
);<br />    scanf(quot;
%lfquot;
, &price7);<br />    totalprice +=price7;<br />    printf(quot;
 The total price of the item is: RM%0.2lf quot;
, totalprice);<br />    printf(quot;
 The average price of the item is: RM%0.2lf quot;
, totalprice/7);<br />    printf(quot;
End of programquot;
);<br />    <br />    getch();<br />    return 0;<br />}<br />1.1 Study program 1.0 carefully, then compile and execute it.<br />,[object Object]
Why do you need 7 variables to hold the prices of the items?
Why is the variable totalprice initialized to 0?

Contenu connexe

Tendances

Template matching
Template matchingTemplate matching
Template matchingHasan Ijaz
 
Lecture 8 increment_and_decrement_operators
Lecture 8 increment_and_decrement_operatorsLecture 8 increment_and_decrement_operators
Lecture 8 increment_and_decrement_operatorseShikshak
 
Call by value
Call by valueCall by value
Call by valueDharani G
 
Write a program that accepts percentage from the user and displays its grade ...
Write a program that accepts percentage from the user and displays its grade ...Write a program that accepts percentage from the user and displays its grade ...
Write a program that accepts percentage from the user and displays its grade ...Farwa Aqeel
 
How c program execute in c program
How c program execute in c program How c program execute in c program
How c program execute in c program Rumman Ansari
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in CPrabhu Govind
 
Operators in C/C++
Operators in C/C++Operators in C/C++
Operators in C/C++Shobi P P
 
Conditional operators
Conditional operatorsConditional operators
Conditional operatorsBU
 
2. operators in c
2. operators in c2. operators in c
2. operators in camar kakde
 
Logical and Conditional Operator In C language
Logical and Conditional Operator In C languageLogical and Conditional Operator In C language
Logical and Conditional Operator In C languageAbdul Rehman
 
Types of c operators ppt
Types of c operators pptTypes of c operators ppt
Types of c operators pptViraj Shah
 
Programming Global variable
Programming Global variableProgramming Global variable
Programming Global variableimtiazalijoono
 
C OPERATOR
C OPERATORC OPERATOR
C OPERATORrricky98
 
C operators
C operatorsC operators
C operatorsGPERI
 

Tendances (20)

Template matching
Template matchingTemplate matching
Template matching
 
Lecture 8 increment_and_decrement_operators
Lecture 8 increment_and_decrement_operatorsLecture 8 increment_and_decrement_operators
Lecture 8 increment_and_decrement_operators
 
Operators
OperatorsOperators
Operators
 
Practical no 6
Practical no 6Practical no 6
Practical no 6
 
Call by value
Call by valueCall by value
Call by value
 
Arithmetic operator
Arithmetic operatorArithmetic operator
Arithmetic operator
 
Write a program that accepts percentage from the user and displays its grade ...
Write a program that accepts percentage from the user and displays its grade ...Write a program that accepts percentage from the user and displays its grade ...
Write a program that accepts percentage from the user and displays its grade ...
 
How c program execute in c program
How c program execute in c program How c program execute in c program
How c program execute in c program
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
 
Operators in C/C++
Operators in C/C++Operators in C/C++
Operators in C/C++
 
C Operators
C OperatorsC Operators
C Operators
 
P3
P3P3
P3
 
Conditional operators
Conditional operatorsConditional operators
Conditional operators
 
2. operators in c
2. operators in c2. operators in c
2. operators in c
 
Logical and Conditional Operator In C language
Logical and Conditional Operator In C languageLogical and Conditional Operator In C language
Logical and Conditional Operator In C language
 
Types of c operators ppt
Types of c operators pptTypes of c operators ppt
Types of c operators ppt
 
Programming Global variable
Programming Global variableProgramming Global variable
Programming Global variable
 
C OPERATOR
C OPERATORC OPERATOR
C OPERATOR
 
C operators
C operatorsC operators
C operators
 
Cinfo
CinfoCinfo
Cinfo
 

En vedette

Teaching people how to treat you
Teaching people how to treat youTeaching people how to treat you
Teaching people how to treat youBrad Hyde
 
Design_of_Machine_Elements_Spo
Design_of_Machine_Elements_SpoDesign_of_Machine_Elements_Spo
Design_of_Machine_Elements_Sporamiljayureta
 
Rèdais & IED_Razzak
Rèdais & IED_RazzakRèdais & IED_Razzak
Rèdais & IED_RazzakRèdais
 
A history of lemonade
A history of lemonadeA history of lemonade
A history of lemonadeLemonadeDay
 
Nha Tran Brand Brief
Nha Tran Brand BriefNha Tran Brand Brief
Nha Tran Brand BriefErnest Chan
 
How to turn Facebook 'likes' into leads and customers on auto-pilot.
How to turn Facebook 'likes' into leads and customers on auto-pilot.How to turn Facebook 'likes' into leads and customers on auto-pilot.
How to turn Facebook 'likes' into leads and customers on auto-pilot.Julia Bramble
 
Модель автоматизированной системы мониторинга результативности процесса обуче...
Модель автоматизированной системы мониторинга результативности процесса обуче...Модель автоматизированной системы мониторинга результативности процесса обуче...
Модель автоматизированной системы мониторинга результативности процесса обуче...Mikhail Bogdanov
 
Amanda Kane - Presentation Mdes 810 Entrepeneurship Applied
Amanda Kane - Presentation Mdes 810 Entrepeneurship AppliedAmanda Kane - Presentation Mdes 810 Entrepeneurship Applied
Amanda Kane - Presentation Mdes 810 Entrepeneurship Appliedamandakane1
 
Ance_D'Annibale_24052011
Ance_D'Annibale_24052011Ance_D'Annibale_24052011
Ance_D'Annibale_24052011Rèdais
 
Que saben de_ciencias_os_nosos_estudantes
Que saben de_ciencias_os_nosos_estudantesQue saben de_ciencias_os_nosos_estudantes
Que saben de_ciencias_os_nosos_estudantesjuanapardo
 
Recruitment services for pharmaceuticals
Recruitment services for pharmaceuticalsRecruitment services for pharmaceuticals
Recruitment services for pharmaceuticalscrescitasolutions
 
Ance_Gallesio_24052011
Ance_Gallesio_24052011Ance_Gallesio_24052011
Ance_Gallesio_24052011Rèdais
 
interpretation_of_probability
interpretation_of_probabilityinterpretation_of_probability
interpretation_of_probabilityramiljayureta
 
Dti2143 chapter 5
Dti2143 chapter 5Dti2143 chapter 5
Dti2143 chapter 5alish sha
 

En vedette (20)

Teaching people how to treat you
Teaching people how to treat youTeaching people how to treat you
Teaching people how to treat you
 
Biotecno
BiotecnoBiotecno
Biotecno
 
Design_of_Machine_Elements_Spo
Design_of_Machine_Elements_SpoDesign_of_Machine_Elements_Spo
Design_of_Machine_Elements_Spo
 
Perspective
PerspectivePerspective
Perspective
 
Rèdais & IED_Razzak
Rèdais & IED_RazzakRèdais & IED_Razzak
Rèdais & IED_Razzak
 
A history of lemonade
A history of lemonadeA history of lemonade
A history of lemonade
 
GEOG101 Chapter 4 Lecture
GEOG101 Chapter 4 LectureGEOG101 Chapter 4 Lecture
GEOG101 Chapter 4 Lecture
 
Nha Tran Brand Brief
Nha Tran Brand BriefNha Tran Brand Brief
Nha Tran Brand Brief
 
How to turn Facebook 'likes' into leads and customers on auto-pilot.
How to turn Facebook 'likes' into leads and customers on auto-pilot.How to turn Facebook 'likes' into leads and customers on auto-pilot.
How to turn Facebook 'likes' into leads and customers on auto-pilot.
 
Модель автоматизированной системы мониторинга результативности процесса обуче...
Модель автоматизированной системы мониторинга результативности процесса обуче...Модель автоматизированной системы мониторинга результативности процесса обуче...
Модель автоматизированной системы мониторинга результативности процесса обуче...
 
Amanda Kane - Presentation Mdes 810 Entrepeneurship Applied
Amanda Kane - Presentation Mdes 810 Entrepeneurship AppliedAmanda Kane - Presentation Mdes 810 Entrepeneurship Applied
Amanda Kane - Presentation Mdes 810 Entrepeneurship Applied
 
Ance_D'Annibale_24052011
Ance_D'Annibale_24052011Ance_D'Annibale_24052011
Ance_D'Annibale_24052011
 
Proceso de cambios vip
Proceso de cambios vipProceso de cambios vip
Proceso de cambios vip
 
Que saben de_ciencias_os_nosos_estudantes
Que saben de_ciencias_os_nosos_estudantesQue saben de_ciencias_os_nosos_estudantes
Que saben de_ciencias_os_nosos_estudantes
 
Recruitment services for pharmaceuticals
Recruitment services for pharmaceuticalsRecruitment services for pharmaceuticals
Recruitment services for pharmaceuticals
 
Ance_Gallesio_24052011
Ance_Gallesio_24052011Ance_Gallesio_24052011
Ance_Gallesio_24052011
 
interpretation_of_probability
interpretation_of_probabilityinterpretation_of_probability
interpretation_of_probability
 
Dti2143 chapter 5
Dti2143 chapter 5Dti2143 chapter 5
Dti2143 chapter 5
 
Vocabulary cards
Vocabulary cardsVocabulary cards
Vocabulary cards
 
Investment presentation
Investment presentationInvestment presentation
Investment presentation
 

Similaire à Dti2143 lab sheet 6

Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10alish sha
 
Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9alish sha
 
Presentation 2 (1).pdf
Presentation 2 (1).pdfPresentation 2 (1).pdf
Presentation 2 (1).pdfziyadaslanbey
 
CS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionCS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionEelco Visser
 
Bti1022 lab sheet 3
Bti1022 lab sheet 3Bti1022 lab sheet 3
Bti1022 lab sheet 3alish sha
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 manjurkts
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans incnayakq
 
Compiler Construction | Lecture 2 | Declarative Syntax Definition
Compiler Construction | Lecture 2 | Declarative Syntax DefinitionCompiler Construction | Lecture 2 | Declarative Syntax Definition
Compiler Construction | Lecture 2 | Declarative Syntax DefinitionEelco Visser
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17manjurkts
 
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxJLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxvrickens
 
Labsheet2 stud
Labsheet2 studLabsheet2 stud
Labsheet2 studrohassanie
 

Similaire à Dti2143 lab sheet 6 (20)

Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10
 
Dti2143 lab sheet 9
Dti2143 lab sheet 9Dti2143 lab sheet 9
Dti2143 lab sheet 9
 
Lab 1
Lab 1Lab 1
Lab 1
 
Presentation 2 (1).pdf
Presentation 2 (1).pdfPresentation 2 (1).pdf
Presentation 2 (1).pdf
 
C important questions
C important questionsC important questions
C important questions
 
CS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definitionCS4200 2019 | Lecture 2 | syntax-definition
CS4200 2019 | Lecture 2 | syntax-definition
 
Bti1022 lab sheet 3
Bti1022 lab sheet 3Bti1022 lab sheet 3
Bti1022 lab sheet 3
 
C code examples
C code examplesC code examples
C code examples
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
 
Simple Java Programs
Simple Java ProgramsSimple Java Programs
Simple Java Programs
 
Simple Java Programs
Simple Java ProgramsSimple Java Programs
Simple Java Programs
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans inc
 
Compiler Construction | Lecture 2 | Declarative Syntax Definition
Compiler Construction | Lecture 2 | Declarative Syntax DefinitionCompiler Construction | Lecture 2 | Declarative Syntax Definition
Compiler Construction | Lecture 2 | Declarative Syntax Definition
 
C function presentation
C function presentationC function presentation
C function presentation
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
 
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docxJLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
JLK Chapter 5 – Methods and ModularityDRAFT January 2015 Edition.docx
 
Labsheet2 stud
Labsheet2 studLabsheet2 stud
Labsheet2 stud
 
Programming in C
Programming in CProgramming in C
Programming in C
 
17 Jo P May 08
17 Jo P May 0817 Jo P May 08
17 Jo P May 08
 
C chap02
C chap02C chap02
C chap02
 

Plus de 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
 
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
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13alish 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 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012alish sha
 
Purpose elaborate
Purpose elaboratePurpose elaborate
Purpose elaboratealish sha
 
Test 1 alish schema 1
Test 1 alish schema 1Test 1 alish schema 1
Test 1 alish schema 1alish sha
 
Lab 6 sem ii_11_12
Lab 6 sem ii_11_12Lab 6 sem ii_11_12
Lab 6 sem ii_11_12alish 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
 

Plus de 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
 
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)
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13
 
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13
 
Lab 6
Lab 6Lab 6
Lab 6
 
Lab 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012
 
Purpose elaborate
Purpose elaboratePurpose elaborate
Purpose elaborate
 
Lab sheet 1
Lab sheet 1Lab sheet 1
Lab sheet 1
 
Test 1 alish schema 1
Test 1 alish schema 1Test 1 alish schema 1
Test 1 alish schema 1
 
Lab 6 sem ii_11_12
Lab 6 sem ii_11_12Lab 6 sem ii_11_12
Lab 6 sem ii_11_12
 
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
 

Dernier

Top places to visit, top tourist destinations
Top places to visit, top tourist destinationsTop places to visit, top tourist destinations
Top places to visit, top tourist destinationsswarajdm34
 
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot ModelHowrah Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Ooty Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Ooty Call Girls 🥰 8617370543 Service Offer VIP Hot ModelOoty Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Ooty Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...samsungultra782445
 
Pithoragarh Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Pithoragarh Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPithoragarh Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Pithoragarh Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Sun World Bana Hills, Vienam Part 2 (越南 巴拿山太陽世界 下集).ppsx
Sun World Bana Hills, Vienam Part 2  (越南 巴拿山太陽世界 下集).ppsxSun World Bana Hills, Vienam Part 2  (越南 巴拿山太陽世界 下集).ppsx
Sun World Bana Hills, Vienam Part 2 (越南 巴拿山太陽世界 下集).ppsxChung Yen Chang
 
Prayagraj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Prayagraj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPrayagraj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Prayagraj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Four Famous Temples In Jammu and Kashmir
Four Famous Temples In Jammu and KashmirFour Famous Temples In Jammu and Kashmir
Four Famous Temples In Jammu and KashmirSuYatra
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sampleCasey Keith
 
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...mountabuangels4u
 
abortion pills in Riyadh+966572737505 Cytotec Riyadh
abortion pills in  Riyadh+966572737505    Cytotec Riyadhabortion pills in  Riyadh+966572737505    Cytotec Riyadh
abortion pills in Riyadh+966572737505 Cytotec Riyadhsamsungultra782445
 
TOURISM ATTRACTION IN LESOTHO 2024.pptx.
TOURISM ATTRACTION IN LESOTHO 2024.pptx.TOURISM ATTRACTION IN LESOTHO 2024.pptx.
TOURISM ATTRACTION IN LESOTHO 2024.pptx.lihabaneo
 
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot ModelBirbhum Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPaschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptx
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptxElevate Your Busy Season Email Marketing, Holly May Webinar.pptx
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptxRezStream
 
Purba Bardhaman Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Purba Bardhaman Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPurba Bardhaman Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Purba Bardhaman Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sampleCasey Keith
 
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...mountabuangels4u
 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sampleCasey Keith
 
Rudrapur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Rudrapur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelRudrapur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Rudrapur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 

Dernier (20)

Top places to visit, top tourist destinations
Top places to visit, top tourist destinationsTop places to visit, top tourist destinations
Top places to visit, top tourist destinations
 
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot ModelHowrah Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Howrah Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Ooty Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Ooty Call Girls 🥰 8617370543 Service Offer VIP Hot ModelOoty Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Ooty Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
Pithoragarh Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Pithoragarh Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPithoragarh Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Pithoragarh Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Sun World Bana Hills, Vienam Part 2 (越南 巴拿山太陽世界 下集).ppsx
Sun World Bana Hills, Vienam Part 2  (越南 巴拿山太陽世界 下集).ppsxSun World Bana Hills, Vienam Part 2  (越南 巴拿山太陽世界 下集).ppsx
Sun World Bana Hills, Vienam Part 2 (越南 巴拿山太陽世界 下集).ppsx
 
Prayagraj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Prayagraj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPrayagraj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Prayagraj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Four Famous Temples In Jammu and Kashmir
Four Famous Temples In Jammu and KashmirFour Famous Temples In Jammu and Kashmir
Four Famous Temples In Jammu and Kashmir
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
Vadodara Escort💋 Call Girl (Bindu) Service #Vadodara Call Girl @Independent G...
 
abortion pills in Riyadh+966572737505 Cytotec Riyadh
abortion pills in  Riyadh+966572737505    Cytotec Riyadhabortion pills in  Riyadh+966572737505    Cytotec Riyadh
abortion pills in Riyadh+966572737505 Cytotec Riyadh
 
TOURISM ATTRACTION IN LESOTHO 2024.pptx.
TOURISM ATTRACTION IN LESOTHO 2024.pptx.TOURISM ATTRACTION IN LESOTHO 2024.pptx.
TOURISM ATTRACTION IN LESOTHO 2024.pptx.
 
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot ModelBirbhum Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Birbhum Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPaschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptx
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptxElevate Your Busy Season Email Marketing, Holly May Webinar.pptx
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptx
 
Purba Bardhaman Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Purba Bardhaman Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPurba Bardhaman Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Purba Bardhaman Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
 
Rudrapur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Rudrapur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelRudrapur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Rudrapur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Dti2143 lab sheet 6

  • 1.
  • 2. Why do you need 7 variables to hold the prices of the items?
  • 3. Why is the variable totalprice initialized to 0?
  • 4. Identify the set of statements that are repeated many times in the program
  • 5.
  • 8. for (int item=7;item>0;item--)e. Modify the program such that it will calculate and print the average and the total prices of 20 items.<br />Exercise 3: Write a C program to draw a symmetrical triangle by using for-loop. The program should be able to produce output as follows: <br />Exercise 4:<br />Write a C programme for Holiday Villa Subang Jaya Business Lounge internet charges that calculates the total charges for internet usage. Operation time: 08:00-22:00 and the charges are as follows:<br />HoursRateFirstRM 3.00Second to FifthRM 2.00Subsequence RM 1.00<br />Allow the user to repeat calculations as many times as needed and enter ‘n’ to stop. The output should similar as follow:<br />