Showing posts with label 10/11 SEM 2 BCT1113. Show all posts
Showing posts with label 10/11 SEM 2 BCT1113. Show all posts

4/27/2011

GRED BCT1113

Lecturer : MOHD NAZRI BIN IBRAHIM

Subject : BCT1113 COMPUTER PROGRAMMING

CLASS : 1 BMET

*keputusan di bawah adalah tertakluk kepada keputusan mesyuarat senat TATiUC.


No.

Matric No.

GRED

1

10B02044

B

2

10B02101

B

3

10B02102

C

4

10B02103

B-

5

10B02105

B-

6

10B02106

B-

7

10B02107

A-

8

10B02108

B+

9

10B02109

B+

10

10B02110

B-

11

10B02111

B

12

10B02112

B+

13

10B02113

A-

14

10B02114

B

15

10B02116

B

16

10B02117

B

17

10B02118

B

18

10B02119

B

19

10B02121

A

20

10B06013

B+

21

10B12031

B-

22

10C12016

B

2/23/2011

BCT1113 CP lab 24/2/2011


Write a program that asks the user to type 10 integers and writes the sum of these integers. Use either while or do-while or for loop. Start with a pseudocode and flowchart.


Flowchart



C++ Program


#include<iostream.h>

int main(void)

{

int n;

int sum =0;

int counter = 1;

while(counter <=10)

{

cout<<"sila masukkan no ";

cin>>n;

sum = sum +n;

counter = counter +1;

}

cout<<"Hasil tambah 10 nombor ialah : "<<sum;

return 0;

}

1/30/2011

BCT1113 Test 1 (sample)

1. Respond with the correct answer by marking either True "T" or False "F" for each question.

a) High-level languages include Basic, FORTRAN, COBOL, Pascal, C, C++, C#, and Java

b) Compiler: translates a program written in a high-level language machine language

c) Preprocessor directives begin with # and are processed by a the preprocessor

d) Use the compiler to: Check that the program obeys the rules

e) Linker: Combines object program with other programs provided by the SDK to create executable code

f) Programming is a process of problem solving

g) Algorithm: Step-by-step problem-solving process

h) Two popular approaches to programming design: - 1) Structured 2) Object-oriented

i) The structured design approach is also called Modular Design


2. Print the output of the following C++ statement. If nothing prints, then answer "nothing". Assume x=3 and y=2.

Example) cout<<x; 2


a) cout<<y;

b) / * cout<<y; */

c) // cout<<x+y;

d) cout<<x<<y;

e) cout<<x<<endl<<y;

f) cout<<x+y;

g) cout<<"x+y="<<x+y;

h) cin>>x%y;

i) cout<<++x;

j) cout<<y++;


3. Print the output of the following C++ statement. If nothing prints, then answer "nothing".


a) if(1<3)

cout<<"Yes";

else

cout<<"No";


b) char race='M';

if ((race=='m') ||( race =='M')) then

cout<<"Malay";

else

cout<<"Others";


c) char race='M';

int age = 21;

if ((race=='m') &&( age <=20)) then

cout<<"MARA LOAN";

else

cout<<"PTPTN LOAN";


4. What is the output of the following C++ code segment:-


char race;

int age;

cin>>race>>age;

if(race='m')

if(age<=20)

cout<<"MARA LOAN";

else

cout<<"PTPTN LOAN";

else

cout<<"OTHER LOAN";


a) When the user inputs "C" for race and 21 for age

b) When the user inputs "C" for race and 18 for age

c) When the user inputs "m" for race and 21 for age

d) When the user inputs "m" for race and 18 for age


5. Prepare an algorithm (pseudo code or flowchart) and write a C++ program for each of the following problem.


a) Write a program to find perimeter and area of a rectangle. The perimeter and area of the rectangle are given by the following formulas:

perimeter = 2 * (length + width)

area = length * width


b) Write a program to read user id and password .if the password is "abubakar" and password is 6855 then print out "Your password is accepted". Otherwise print "Not Accepted".

1/26/2011

1/19/2011

BCT1113 Computer Programming ASSIGNMENT 1

Assignment 1 BCT 1113. Sila download di sini.

Tugasan pertama ini akan menguji kemahiran ' problem solving ' pelajar dalam menyelesaikan masalah seharian.

Pelajar di minta menyediakan Algorithma (flowchart dan pesudoce) serta program C++ bagi setiap masalah yang di berikan.

Tarikh Hantar ialah pada : 17/2/2011.

'Viva' untuk setiap pelajar akan di buat selepas semua tugsan di terima.

12/13/2010

BCT1113 COMPUTER PROGRAMMING

Berikut adalah senarai bahan-bahan kuliah untuk BCT 1113 Computer Programming.
Semester 2010-2011 II.

A. "Lesson Plan"

B. "Slide powerpoint"

TOPIC(S)

1. Introduction to Programming

1.1 Steps to run Microsoft Visual C++
1.2 An Overview of Computers and Programming Languages (Chapter 0)
1.3 Algorithma (Pseudocode , Flowchart )
2. Overview of C++ Language (BooksChapter 1)
3. Input / Output(Chapter 2)
4. Control Structures 1-Selection (Chapter 3)
5. Control Structures 2 -Looping/Repetition (Chapter 4)
6. User Define Functions (Chapter 5)
7. Arrays (Chapter 6)


C. Latihan Makmal (Lab sheet)

LAB 1 INTRODUCTION TO PROGRAMMING
LAB 2 CONTROL STRUCTURES-SELECTION
LAB 3 CONTROL STRUCTURES- REPETITION
LAB 4 FUNCTION
LAB 5 ARRAY

Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...