SlideShare a Scribd company logo
1 of 3
left0UNIVERSITI TUN HUSSEIN ONN MALAYSIA<br />FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING <br />DTI 2143: COMPUTER PROGRAMMING<br />LAB EXERCISE 2<br />,[object Object]
(Ignore the bold numbering and undo each change you made before executing the next instruction)1#include <stdio.h>2#include <conio.h>34int main()5{6int sem_no,cad_no;7sem_no =3;8cad_no =2;9printf(quot;
%dquot;
, sem_no);10printf(quot;
Semester %dquot;
,sem_no);11printf(quot;
Semester %d, in Lab CAD %dquot;
,sem_no, cad_no);12getch();13return 0;14}<br />InstructionObservationCompile and run the programType // before #include<stdio.h> in line 1Change the word int to INT in line 4Type // before sem_no=3 in line 7Add  before the word semester in line 10Add   before the word Lab in line 11Add  before the word Lab in line 11<br />,[object Object]
#inclue<stdio.h> int main(){Sloat salary , tax, net_salary;printf("Enter  basic salary:");scanf("%f",salary);tax-0.14*salary;net-salary=salary-tax;printf("Your tax is : %.2f", tax);printf("Your salary is: %.2f", net_salary);return 0;}

More Related Content

Viewers also liked

Evolución xeolóxica dos seres vivos
Evolución xeolóxica dos seres vivosEvolución xeolóxica dos seres vivos
Evolución xeolóxica dos seres vivosjuanapardo
 
Advert planning
Advert planningAdvert planning
Advert planningReganROFL
 
Ance_Gallano_24052011
Ance_Gallano_24052011Ance_Gallano_24052011
Ance_Gallano_24052011Rèdais
 
Dia de la Madre 2013
Dia de la Madre 2013Dia de la Madre 2013
Dia de la Madre 2013clautela
 
interpretation_of_probability
interpretation_of_probabilityinterpretation_of_probability
interpretation_of_probabilityramiljayureta
 
Handout mid term 1 kelas x mipa sma citra kasih jkt
Handout mid term 1 kelas x mipa sma citra kasih jktHandout mid term 1 kelas x mipa sma citra kasih jkt
Handout mid term 1 kelas x mipa sma citra kasih jktFajar Adinugraha
 
あなたの時間を1秒節約します
あなたの時間を1秒節約しますあなたの時間を1秒節約します
あなたの時間を1秒節約しますTomoyuki Tochihira
 
29 fotosintese
29 fotosintese29 fotosintese
29 fotosintesejuanapardo
 
Assistive technology web_quest_vicki_dowse
Assistive technology web_quest_vicki_dowseAssistive technology web_quest_vicki_dowse
Assistive technology web_quest_vicki_dowsevdowse
 
Rèdais & IED_Piovano
Rèdais & IED_PiovanoRèdais & IED_Piovano
Rèdais & IED_PiovanoRèdais
 
Design Engage Program - An Overview
Design Engage Program - An OverviewDesign Engage Program - An Overview
Design Engage Program - An OverviewCloud View Pte Ltd
 
Ways of Looking 1
Ways of Looking 1Ways of Looking 1
Ways of Looking 1amandakane1
 
Profileer jezelf met social media
Profileer jezelf met social mediaProfileer jezelf met social media
Profileer jezelf met social mediaTom van den Berg
 
Infusionsoft: How to prepare a file to import
Infusionsoft: How to prepare a file to importInfusionsoft: How to prepare a file to import
Infusionsoft: How to prepare a file to importMarvin Libron
 

Viewers also liked (20)

Evolución xeolóxica dos seres vivos
Evolución xeolóxica dos seres vivosEvolución xeolóxica dos seres vivos
Evolución xeolóxica dos seres vivos
 
Advert planning
Advert planningAdvert planning
Advert planning
 
Ance_Gallano_24052011
Ance_Gallano_24052011Ance_Gallano_24052011
Ance_Gallano_24052011
 
Dia de la Madre 2013
Dia de la Madre 2013Dia de la Madre 2013
Dia de la Madre 2013
 
interpretation_of_probability
interpretation_of_probabilityinterpretation_of_probability
interpretation_of_probability
 
Handout mid term 1 kelas x mipa sma citra kasih jkt
Handout mid term 1 kelas x mipa sma citra kasih jktHandout mid term 1 kelas x mipa sma citra kasih jkt
Handout mid term 1 kelas x mipa sma citra kasih jkt
 
Biblioteca de MIEDO
Biblioteca de MIEDOBiblioteca de MIEDO
Biblioteca de MIEDO
 
あなたの時間を1秒節約します
あなたの時間を1秒節約しますあなたの時間を1秒節約します
あなたの時間を1秒節約します
 
29 fotosintese
29 fotosintese29 fotosintese
29 fotosintese
 
تعليمات السلامة
تعليمات السلامةتعليمات السلامة
تعليمات السلامة
 
Assistive technology web_quest_vicki_dowse
Assistive technology web_quest_vicki_dowseAssistive technology web_quest_vicki_dowse
Assistive technology web_quest_vicki_dowse
 
Rèdais & IED_Piovano
Rèdais & IED_PiovanoRèdais & IED_Piovano
Rèdais & IED_Piovano
 
Design Engage Program - An Overview
Design Engage Program - An OverviewDesign Engage Program - An Overview
Design Engage Program - An Overview
 
Apuntes
Apuntes Apuntes
Apuntes
 
Element 1 vocabulary cards
Element 1   vocabulary cardsElement 1   vocabulary cards
Element 1 vocabulary cards
 
Romantikken
RomantikkenRomantikken
Romantikken
 
Puc Iu
Puc IuPuc Iu
Puc Iu
 
Ways of Looking 1
Ways of Looking 1Ways of Looking 1
Ways of Looking 1
 
Profileer jezelf met social media
Profileer jezelf met social mediaProfileer jezelf met social media
Profileer jezelf met social media
 
Infusionsoft: How to prepare a file to import
Infusionsoft: How to prepare a file to importInfusionsoft: How to prepare a file to import
Infusionsoft: How to prepare a file to import
 

Similar to UTHM Faculty of Mechanical and Manufacturing Engineering DTI 2143 Computer Programming Lab Exercise 2

Similar to UTHM Faculty of Mechanical and Manufacturing Engineering DTI 2143 Computer Programming Lab Exercise 2 (20)

Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
 
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
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
Readregister 1Readregister 2WriteregisterWri.docx
Readregister 1Readregister 2WriteregisterWri.docxReadregister 1Readregister 2WriteregisterWri.docx
Readregister 1Readregister 2WriteregisterWri.docx
 
C Language Unit-1
C Language Unit-1C Language Unit-1
C Language Unit-1
 
Dti2143 lab sheet 6
Dti2143 lab sheet 6Dti2143 lab sheet 6
Dti2143 lab sheet 6
 
Unit1 jwfiles
Unit1 jwfilesUnit1 jwfiles
Unit1 jwfiles
 
C chap02
C chap02C chap02
C chap02
 
C chap02
C chap02C chap02
C chap02
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
 
Graphic Design Lab File.docx
Graphic Design Lab File.docxGraphic Design Lab File.docx
Graphic Design Lab File.docx
 
lecture 5
 lecture 5 lecture 5
lecture 5
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
 
Lec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdfLec1_EENG112-Introduction.pdf
Lec1_EENG112-Introduction.pdf
 
BScPLSQL.pdf
BScPLSQL.pdfBScPLSQL.pdf
BScPLSQL.pdf
 
Muzzammilrashid
MuzzammilrashidMuzzammilrashid
Muzzammilrashid
 
Design problem
Design problemDesign problem
Design problem
 
c programing
c programingc programing
c programing
 

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

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

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

UTHM Faculty of Mechanical and Manufacturing Engineering DTI 2143 Computer Programming Lab Exercise 2

  • 1.
  • 2.
  • 3. #inclue<stdio.h> int main(){Sloat salary , tax, net_salary;printf("Enter basic salary:");scanf("%f",salary);tax-0.14*salary;net-salary=salary-tax;printf("Your tax is : %.2f", tax);printf("Your salary is: %.2f", net_salary);return 0;}
  • 4. Type the output and explain the calculation
  • 5. #include <stdio.h>#include <conio.h>int main(){int num= 20;printf ("%d", num);int val=30;printf ("%d", val);num=val+5; printf ("%d", num);val=num-val;printf ("%d", val);num=num+2;printf ("%d", num);val=30/7;printf ("%d", val);getch();return 0;}
  • 6.