SlideShare ist ein Scribd-Unternehmen logo
1 von 2
UNIVERSITI TUN HUSSEIN ONN MALAYSIA
      FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING
      DTI2143/DAM31303: COMPUTER PROGRAMMING

      LAB EXERCISE 2: Design Recap and Introduction to C - the program

1. What are the 6 rules to design pseudo-code?

2. Transform pseudo code below into flow chart

      o Start
      o Accept first integer, X
      o Accept second integer value, Y
      o Compute the multiplication of first integer value and second integer value: result
        = X*Y
      o Display result
      o End

3. Convert the flow chart below to pseudo code
4. Open a complier on your PC, find either Turbo C++ or Dev- C++
      a. Run (execute) the following program:

                  #include <stdio.h>
                  void main ( )
                  {
                         printf(“ SELAMAT DATANG KE KELAS PENGATURCARAAN C”);
                         printf(“n WELCOME TO C PROGRAMMING CLASS”);

                  }

       b. Add #include<conio.h> after include <stdio.h>, state the difference(s).

       c. Add getch() before { , state the difference(s).

       d. Rewrite the program to display the following

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (16)

1 (1)
1 (1)1 (1)
1 (1)
 
Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1Bcsl 033 data and file structures lab s2-1
Bcsl 033 data and file structures lab s2-1
 
C coding#1
C   coding#1C   coding#1
C coding#1
 
Plsql
PlsqlPlsql
Plsql
 
Bcsl 033 data and file structures lab s2-2
Bcsl 033 data and file structures lab s2-2Bcsl 033 data and file structures lab s2-2
Bcsl 033 data and file structures lab s2-2
 
C program to add two numbers
C program to add two numbers C program to add two numbers
C program to add two numbers
 
Exam for c
Exam for cExam for c
Exam for c
 
C programming Lab 1
C programming Lab 1C programming Lab 1
C programming Lab 1
 
Project code for Project on Student information management system
Project code for Project on Student information management systemProject code for Project on Student information management system
Project code for Project on Student information management system
 
Ffffffffffff
FfffffffffffFfffffffffff
Ffffffffffff
 
Shan
ShanShan
Shan
 
Factorial
FactorialFactorial
Factorial
 
MFC Polygon
MFC PolygonMFC Polygon
MFC Polygon
 
Prime number program in C
Prime number program in CPrime number program in C
Prime number program in C
 
week-10x
week-10xweek-10x
week-10x
 
C programming Lab 2
C programming Lab 2C programming Lab 2
C programming Lab 2
 

Ähnlich wie UTHM Lab Exercise 2: C Programming Introduction

ICT1002-W8-LEC-Introduction-to-C.pdf
ICT1002-W8-LEC-Introduction-to-C.pdfICT1002-W8-LEC-Introduction-to-C.pdf
ICT1002-W8-LEC-Introduction-to-C.pdfssuser33f16f
 
Labsheet1 stud
Labsheet1 studLabsheet1 stud
Labsheet1 studrohassanie
 
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHF
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHFC BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHF
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHFAbcdR5
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILEDipta Saha
 
cuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfcuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfYashwanthCse
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C ProgrammingShuvongkor Barman
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALPrabhu D
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startednoahjamessss
 

Ähnlich wie UTHM Lab Exercise 2: C Programming Introduction (20)

ICT1002-W8-LEC-Introduction-to-C.pdf
ICT1002-W8-LEC-Introduction-to-C.pdfICT1002-W8-LEC-Introduction-to-C.pdf
ICT1002-W8-LEC-Introduction-to-C.pdf
 
Programming in c
Programming in cProgramming in c
Programming in c
 
C - ISRO
C - ISROC - ISRO
C - ISRO
 
Labsheet1stud
Labsheet1studLabsheet1stud
Labsheet1stud
 
2621008 - C++ 1
2621008 -  C++ 12621008 -  C++ 1
2621008 - C++ 1
 
Linux_C_LabBasics.ppt
Linux_C_LabBasics.pptLinux_C_LabBasics.ppt
Linux_C_LabBasics.ppt
 
Labsheet_3
Labsheet_3Labsheet_3
Labsheet_3
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
 
Labsheet1 stud
Labsheet1 studLabsheet1 stud
Labsheet1 stud
 
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHF
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHFC BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHF
C BASICS.pptx FFDJF/,DKFF90DF SDPJKFJ[DSSIFLHDSHF
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
 
cuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdfcuptopointer-180804092048-190306091149 (2).pdf
cuptopointer-180804092048-190306091149 (2).pdf
 
Muzzammilrashid
MuzzammilrashidMuzzammilrashid
Muzzammilrashid
 
C fundamentals
C fundamentalsC fundamentals
C fundamentals
 
I PUC CS Lab_programs
I PUC CS Lab_programsI PUC CS Lab_programs
I PUC CS Lab_programs
 
Lab 1.pptx
Lab 1.pptxLab 1.pptx
Lab 1.pptx
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 

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

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

UTHM Lab Exercise 2: C Programming Introduction

  • 1. UNIVERSITI TUN HUSSEIN ONN MALAYSIA FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING DTI2143/DAM31303: COMPUTER PROGRAMMING LAB EXERCISE 2: Design Recap and Introduction to C - the program 1. What are the 6 rules to design pseudo-code? 2. Transform pseudo code below into flow chart o Start o Accept first integer, X o Accept second integer value, Y o Compute the multiplication of first integer value and second integer value: result = X*Y o Display result o End 3. Convert the flow chart below to pseudo code
  • 2. 4. Open a complier on your PC, find either Turbo C++ or Dev- C++ a. Run (execute) the following program: #include <stdio.h> void main ( ) { printf(“ SELAMAT DATANG KE KELAS PENGATURCARAAN C”); printf(“n WELCOME TO C PROGRAMMING CLASS”); } b. Add #include<conio.h> after include <stdio.h>, state the difference(s). c. Add getch() before { , state the difference(s). d. Rewrite the program to display the following