0% found this document useful (0 votes)
60 views8 pages

CSC430 Lab 3

This document is a lab assignment for a CSC430 code subject. It involves 5 tasks - the first asks students to trace the output of some C++ statements, the second evaluates expressions given variable declarations, the third evaluates more complex expressions, the fourth writes C++ statements for math expressions, and the fifth is left blank. It is authored by a group of 5 students for their lab3 assignment.

Uploaded by

hey sooha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views8 pages

CSC430 Lab 3

This document is a lab assignment for a CSC430 code subject. It involves 5 tasks - the first asks students to trace the output of some C++ statements, the second evaluates expressions given variable declarations, the third evaluates more complex expressions, the fourth writes C++ statements for math expressions, and the fifth is left blank. It is authored by a group of 5 students for their lab3 assignment.

Uploaded by

hey sooha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Title : Assigment Lab3

Code subject : CSC430


Group : EMD2M1C
Date : April 13 2023

Name Student Id
QURRATUL NADJWA NURAISYAH BINTI NADZRI 2022464476
MUHAMMAD ANIQ ABQARI BIN MOHD 2022464556
SALLEHSHAHIBBUDIN
IZZAIDA NURINA BINTI IZZAD 2022461386
SYAHIR NAJWAN BIN MOHAMMAD SUHAIMI 2022496248
Task 1: Trace the output of the following statement

Int a=0 , b=1 , c=2;


a--; b++; c--;
++a; --b; c--;
a--; b++; c--;
cout << a + 2 << endl;
cout << --b << endl;
cout << c-- << endl;

Task 2: Given the declaration below,find the results of each expression

Int a=3 , b=10 , c=7;


Double w=12 , y=3.2;
Task 3: Given the declarations below, find the result of each expression

a) z = x-n/m

b) b = x*y+m/n*2

c) i = int (x+0.5)
d) j = x*m-n%m

e) k = m/-n
Task 4: Write a C++ assignment statement for each of the following mathematics expression.

a.

b.
c.

d.
e.

f.
g.

You might also like