Technical Summative Assessment 5
Technical Summative Assessment 5
SUMMATIVE
5
OPERATORS, EXPRESSIONS AND INPUT/OUTPUT
OPERATIONS
III. PROCEDURE:
1. Declaring and printing variables. Given the table below, declare the following variables
with the corresponding data types and initialization values. Output to the screen the variable names
together with the values.
Source Code:
#include <stdio.h>
#include <stdbool.h>
void main()
{
//Variable declaration code here...
printf("number = %d\n",number);
printf("letter = %c\n",letter);
result?printf("Result = true\n") : printf("false");
printf("str = %s\n",str);
}
Screenshot of OUTPUT:
Source Code:
Screenshot of OUTPUT:
1. a / b ^ c ^ d – e + f – g * h + i
Answer:
2. 3 * 10 *2 / 15 – 2 + 4 ^ 2 ^ 2
Answer:
3. r ^ s * t / u – v + w ^ x – y++
Answer:
5. The user will input a Philippine amount, then the said amount will be converted to different currencies
namely: US Dollar, Euro, Yuan, Koruna, Krone, Sheqel and Dinar
Sample run:
Enter Philippine peso: 43.33089
Suppose, 1.000 US Dollar is equivalent to Php. 43.33089, 0.734719Euro, 6.346934 Yuan, 18.77263
Koruna, 5.449007 Krone, 3.726334 Sheqel, and 0.274588 Dinar.
Source Code:
Source Code:
Screenshot of OUTPUT:
Source Code:
Screenshot of OUTPUT:
Source Code:
Screenshot of OUTPUT:
1. Which of the four arithmetic operators can operate on string as well as numeric operands?
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________________
2. Assuming total is a variable, how else could you express in code total = total +2?
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________________
VI. Assessment
Note: The following rubrics/metrics will be used to grade students’ output in the Lab
Summative 5.