Now in its third edition, Bronson's C++ for Engineers and Scientists makes C++ accessible to first-level engineering students as C++ maintains its stronghold in engineering and scientific communities. The text continues to take a pragmatic approach that incorporates actual engineering and science problems for its applications and examples. Students begin with a foundation in procedural programming, moving into object-oriented concepts in the second half of the text. This new edition also offers new case studies and an expanded selection of examples from a variety of fields including thermodynamics, optics, and fluid mechanics.
#include <iostream.h> #include <conio.h> void main() { clrscr(); int x = 10; int y = 2; int sum, difference, product, quotient; sum = x + y; difference = x - y; product = x * y; quotient = x / y; cout << "The sum of " << x << " & " << y << " is " << sum << "." << endl; cout << "The difference of " << x << " & " << "y << is " << difference << "." << endl; cout << "The product of " << x << " & " << y << " is " << product << "." << endl; cout << "The quotient of " << x << " & " << y << " is " << quotient << "." << endl; getch(); }