Lesson 04: Operations and Operators

Operations are fundamental actions performed on data in programming languages. Operators are symbols that represent these operations and provide a concise way to express computations. C/C++ offers a rich set of operators for various data types, enabling programmers to perform various calculations and manipulations.

 

Questions

Write a console application for each question.

  1. Calculate the Area of a Triangle: Input the width of the base and the height, then display the area on the screen.
  2. Mileage to Kilometers: Input a value in miles and convert it to kilometers. (1 mile is equal to 1.60934 kilometers)