Written: 2023/03/13

Tags: C++, exercises, lecture 1, standard I/O, strings

Summary

Solutions to exercises proposed at the end of Lecture 1, held on March 7th 2023.

Solutions

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

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.