Written: 2022/03/13
Tags: C++, exercises, lecture 1, standard I/O, strings
Summary
Solutions to the exercises proposed at the end of Lecture 1, held on March 9th, 2022.
Solutions
Solutions
Exercise 1
Exercise 1
Write a program that prompts the user to insert an integer and a floating-point number, then performs and outputs their sum.
Exercise 2
Exercise 2
Write a program that reads a string containing a number, then converts it into an integer, adds 5 to such value, and prints the result as a string.