Arithmetics

3.3 - Multiplication and division


The multiplication and division operators in C++ are * and / respectively.

This line prints out the variable width and height multiplied together:

std::cout << width * height << std::endl;

Task

Make the program prints out the area of a rectangle with the width and height in the first line and the ratio of the width to the height (width divided by height ).

#include <iostream> int main() { int width, height; std::cin >> width >> height; // Start your code here! }