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



                                                 TEST 1
 NAME : _____________________________________                                           MARKS
 MATRICS NO.: _______________ DATE : ________



Write a program to calculate cost of installing tiles in a room. Calculation should be in Meter Square (m2).


The user may choose from two different tile sizes:

                                    20 cm x 20                20 cm x 10
                                        cm                        cm

                                     RM3.00




The output should be similar to:




Please save your file on desktop as <matrixcard>_<yourname>.c
Answer:
 #include<stdio.h>
 #include<conio.h>

 main(){

     float lb, wb,roomsize=0,ttile=0,cost=0,unit;    3m
     int tile;


    reenter:
    printf("nt***Tile Calculator(Metric) And Invoice generator***nn1. 20cm x 20cmn2. 20cm x
 10cmnPlease choose your tile size: ");
    scanf("%d",&tile);
                                            2m
    if(tile!=1 && tile!=2) {goto reenter;}

     printf("nPlease enter room length(m): ");     I/p 1m
     scanf("%f",&lb);
     printf("nPlease enter room width(m): ");
     scanf("%f",&wb);

     roomsize=lb*wb;         1m
     switch(tile){

           case 1:
                unit=3.0;
                ttile=roomsize/4;
                cost=ttile*unit;break;
           case 2:                         2m
               unit=2.0;
                ttile=roomsize/2 ;
                cost=ttile*unit;break;
               }




     printf("nnttt****INVOICE****n");

     printf("nProduct No.tRoom SizetNo.Tile tCost/tiletTotal");                      O/p1m
     printf("n-----------------------------------------------------------------------");
     printf("nt%dt%7.2ftt%6.1fttRM%6.2ftRM%6.2f",tile,roomsize,ttile,unit,cost);

                                                          Run w/o error 3m
                                                          2m??
     getch();

     }

More Related Content

What's hot

Linked list int_data_fdata
Linked list int_data_fdataLinked list int_data_fdata
Linked list int_data_fdataSamsil Arefin
 
Tmux cheatsheet
Tmux cheatsheetTmux cheatsheet
Tmux cheatsheetIan Yang
 
ClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browserClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browserFalko Riemenschneider
 
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)BizTalk360
 
SATySFiのこれからの課題たち
SATySFiのこれからの課題たちSATySFiのこれからの課題たち
SATySFiのこれからの課題たちT. Suwa
 
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methodsjwjablonski
 
Tmux quick-reference
Tmux quick-referenceTmux quick-reference
Tmux quick-referenceRamesh Kumar
 
Currying in Swift
Currying in SwiftCurrying in Swift
Currying in SwiftMaxim Zaks
 
R programming lab 1 - jupyter notebook
R programming lab   1 - jupyter notebookR programming lab   1 - jupyter notebook
R programming lab 1 - jupyter notebookAshwini Mathur
 
Vim cheat-sheet-en
Vim cheat-sheet-enVim cheat-sheet-en
Vim cheat-sheet-enYue-Peng Guo
 
vbscript-reference book
vbscript-reference bookvbscript-reference book
vbscript-reference bookAnand Dhana
 
Program to illustrate Switch, Goto and Exit statements.
Program to illustrate Switch, Goto and  Exit statements.Program to illustrate Switch, Goto and  Exit statements.
Program to illustrate Switch, Goto and Exit statements.harman kaur
 

What's hot (19)

Linked list int_data_fdata
Linked list int_data_fdataLinked list int_data_fdata
Linked list int_data_fdata
 
week-5x
week-5xweek-5x
week-5x
 
Vim
VimVim
Vim
 
Tmux cheatsheet
Tmux cheatsheetTmux cheatsheet
Tmux cheatsheet
 
Mauro yaguachi
Mauro yaguachiMauro yaguachi
Mauro yaguachi
 
Wcbpijwbpij new
Wcbpijwbpij newWcbpijwbpij new
Wcbpijwbpij new
 
ClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browserClojureScript - A functional Lisp for the browser
ClojureScript - A functional Lisp for the browser
 
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)
BizTalk Server Tips & Tricks for Developers and Admins (Deep Dive)
 
SATySFiのこれからの課題たち
SATySFiのこれからの課題たちSATySFiのこれからの課題たち
SATySFiのこれからの課題たち
 
Java Code for Sample Projects Methods
Java Code for Sample Projects MethodsJava Code for Sample Projects Methods
Java Code for Sample Projects Methods
 
Elf文件解析
Elf文件解析Elf文件解析
Elf文件解析
 
Tmux quick-reference
Tmux quick-referenceTmux quick-reference
Tmux quick-reference
 
Currying in Swift
Currying in SwiftCurrying in Swift
Currying in Swift
 
Perimeter
PerimeterPerimeter
Perimeter
 
R programming lab 1 - jupyter notebook
R programming lab   1 - jupyter notebookR programming lab   1 - jupyter notebook
R programming lab 1 - jupyter notebook
 
Vim cheat-sheet-en
Vim cheat-sheet-enVim cheat-sheet-en
Vim cheat-sheet-en
 
vbscript-reference book
vbscript-reference bookvbscript-reference book
vbscript-reference book
 
Program to illustrate Switch, Goto and Exit statements.
Program to illustrate Switch, Goto and  Exit statements.Program to illustrate Switch, Goto and  Exit statements.
Program to illustrate Switch, Goto and Exit statements.
 
MFC Check
MFC CheckMFC Check
MFC Check
 

Viewers also liked

Lab exe 2 dti 2143
Lab exe 2 dti 2143Lab exe 2 dti 2143
Lab exe 2 dti 2143alish 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
 
Purpose elaborate
Purpose elaboratePurpose elaborate
Purpose elaboratealish sha
 
Bti1022 group assignment
Bti1022 group assignmentBti1022 group assignment
Bti1022 group assignmentalish sha
 
Final project
Final projectFinal project
Final projectalish 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
 

Viewers also liked (9)

Lab 6
Lab 6Lab 6
Lab 6
 
Lab exe 2 dti 2143
Lab exe 2 dti 2143Lab exe 2 dti 2143
Lab exe 2 dti 2143
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13
 
Purpose elaborate
Purpose elaboratePurpose elaborate
Purpose elaborate
 
Bti1022 group assignment
Bti1022 group assignmentBti1022 group assignment
Bti1022 group assignment
 
Final project
Final projectFinal project
Final project
 
Lab sheet 1
Lab sheet 1Lab sheet 1
Lab sheet 1
 
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13
 
Lab 5 2012/2012
Lab 5 2012/2012Lab 5 2012/2012
Lab 5 2012/2012
 

Similar to Test 1 alish schema 1

#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docxmayank272369
 
Task4output.txt 2 5 9 13 15 10 1 0 3 7 11 14 1.docx
Task4output.txt 2  5  9 13 15 10  1  0  3  7 11 14 1.docxTask4output.txt 2  5  9 13 15 10  1  0  3  7 11 14 1.docx
Task4output.txt 2 5 9 13 15 10 1 0 3 7 11 14 1.docxjosies1
 
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CSAAKASH KUMAR
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical FileAshwin Francis
 
Manufacturing Cost (2.008x Lecture Slides)
Manufacturing Cost (2.008x Lecture Slides)Manufacturing Cost (2.008x Lecture Slides)
Manufacturing Cost (2.008x Lecture Slides)A. John Hart
 
Router Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditionsRouter Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditionsMorteza Mahdilar
 
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersSheila Sinclair
 
C Recursion, Pointers, Dynamic memory management
C Recursion, Pointers, Dynamic memory managementC Recursion, Pointers, Dynamic memory management
C Recursion, Pointers, Dynamic memory managementSreedhar Chowdam
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7alish sha
 
Write a C program that uses a recursive function to print a triangle .pdf
Write a C program that uses a recursive function to print a triangle .pdfWrite a C program that uses a recursive function to print a triangle .pdf
Write a C program that uses a recursive function to print a triangle .pdfarsmobiles
 
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdfg++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdfarakalamkah11
 
Modify the Time classattached to be able to work with Date.pdf
Modify the Time classattached to be able to work with Date.pdfModify the Time classattached to be able to work with Date.pdf
Modify the Time classattached to be able to work with Date.pdfaaseletronics2013
 

Similar to Test 1 alish schema 1 (20)

#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx#include iostream#includectimeusing namespace std;void.docx
#include iostream#includectimeusing namespace std;void.docx
 
Task4output.txt 2 5 9 13 15 10 1 0 3 7 11 14 1.docx
Task4output.txt 2  5  9 13 15 10  1  0  3  7 11 14 1.docxTask4output.txt 2  5  9 13 15 10  1  0  3  7 11 14 1.docx
Task4output.txt 2 5 9 13 15 10 1 0 3 7 11 14 1.docx
 
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
Manufacturing Cost (2.008x Lecture Slides)
Manufacturing Cost (2.008x Lecture Slides)Manufacturing Cost (2.008x Lecture Slides)
Manufacturing Cost (2.008x Lecture Slides)
 
12
1212
12
 
Functions
FunctionsFunctions
Functions
 
week-3x
week-3xweek-3x
week-3x
 
C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
 
Router Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditionsRouter Queue Simulation in C++ in MMNN and MM1 conditions
Router Queue Simulation in C++ in MMNN and MM1 conditions
 
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
 
2 d matrices
2 d matrices2 d matrices
2 d matrices
 
C Recursion, Pointers, Dynamic memory management
C Recursion, Pointers, Dynamic memory managementC Recursion, Pointers, Dynamic memory management
C Recursion, Pointers, Dynamic memory management
 
oop Lecture 4
oop Lecture 4oop Lecture 4
oop Lecture 4
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
 
Write a C program that uses a recursive function to print a triangle .pdf
Write a C program that uses a recursive function to print a triangle .pdfWrite a C program that uses a recursive function to print a triangle .pdf
Write a C program that uses a recursive function to print a triangle .pdf
 
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdfg++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
g++ -o simpleVector.exe simpleVector.cpp #include stdio.h #i.pdf
 
Modify the Time classattached to be able to work with Date.pdf
Modify the Time classattached to be able to work with Date.pdfModify the Time classattached to be able to work with Date.pdf
Modify the Time classattached to be able to work with Date.pdf
 
Inc decsourcefile
Inc decsourcefileInc decsourcefile
Inc decsourcefile
 
Oop assignment 02
Oop assignment 02Oop assignment 02
Oop assignment 02
 

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
 
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 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
 
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
 
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
 
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 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
 
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
 
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

Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Roland Driesen
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsApsara Of India
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in managementchhavia330
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
DEPED Work From Home WORKWEEK-PLAN.docx
DEPED Work From Home  WORKWEEK-PLAN.docxDEPED Work From Home  WORKWEEK-PLAN.docx
DEPED Work From Home WORKWEEK-PLAN.docxRodelinaLaud
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurSuhani Kapoor
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Roomdivyansh0kumar0
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 

Recently uploaded (20)

Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
 
Best Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting PartnershipBest Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting Partnership
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in management
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
DEPED Work From Home WORKWEEK-PLAN.docx
DEPED Work From Home  WORKWEEK-PLAN.docxDEPED Work From Home  WORKWEEK-PLAN.docx
DEPED Work From Home WORKWEEK-PLAN.docx
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 

Test 1 alish schema 1

  • 1. UNIVERSITI TUN HUSSEIN ONN MALAYSIA FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING BTI 10202: COMPUTER PROGRAMMING TEST 1 NAME : _____________________________________ MARKS MATRICS NO.: _______________ DATE : ________ Write a program to calculate cost of installing tiles in a room. Calculation should be in Meter Square (m2). The user may choose from two different tile sizes: 20 cm x 20 20 cm x 10 cm cm RM3.00 The output should be similar to: Please save your file on desktop as <matrixcard>_<yourname>.c
  • 2. Answer: #include<stdio.h> #include<conio.h> main(){ float lb, wb,roomsize=0,ttile=0,cost=0,unit; 3m int tile; reenter: printf("nt***Tile Calculator(Metric) And Invoice generator***nn1. 20cm x 20cmn2. 20cm x 10cmnPlease choose your tile size: "); scanf("%d",&tile); 2m if(tile!=1 && tile!=2) {goto reenter;} printf("nPlease enter room length(m): "); I/p 1m scanf("%f",&lb); printf("nPlease enter room width(m): "); scanf("%f",&wb); roomsize=lb*wb; 1m switch(tile){ case 1: unit=3.0; ttile=roomsize/4; cost=ttile*unit;break; case 2: 2m unit=2.0; ttile=roomsize/2 ; cost=ttile*unit;break; } printf("nnttt****INVOICE****n"); printf("nProduct No.tRoom SizetNo.Tile tCost/tiletTotal"); O/p1m printf("n-----------------------------------------------------------------------"); printf("nt%dt%7.2ftt%6.1fttRM%6.2ftRM%6.2f",tile,roomsize,ttile,unit,cost); Run w/o error 3m 2m?? getch(); }