Home > Articles > Programming > C/C++

  • Print
  • + Share This
This chapter is from the book

Challenge

Create a new C Command Line Tool named TwoFloats. In its main() function, declare two variables of type float and assign each of them a number with a decimal point, like 3.14 or 42.0. Declare another variable of type double and assign it the sum of the two floats. Print the result using printf(). Refer to the code in this chapter if you need to check your syntax.

  • + Share This
  • 🔖 Save To Your Account