

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A programming exercise from a computer science course focusing on data types, conversions, expressions, mathematical functions, and using symbolic constants. Students are expected to understand data type conversions, write correct expressions, define and use symbolic constants, and utilize mathematical functions from the c++ library.
Typology: Slides
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Larry Caretto Computer Science 106 Computing in Engineering and Science
2
3
4
5
6
7
x y w u v
= +
8
9
10
11
double a; int x = 27, y = 4, z; z = x / y; cout << "Example of output from different” << “ data types. \nIn these results ” << “x = 27, y = 4, and z are type “ << “ int; \na is type double.\n\n"; cout << "For z = x / y, z = " << z; a = x / y; cout << “\nFor a = x / y, a = " << a; z = double( x ) / y; cout << “\nFor z = double( x )/ y, z = "
Study and understand the results 12
y z
w x a −