1#include <iostream>
2int main(){
3 std::string firstname; //variable created as a string
4 std::cout << "What's your first name\n";
5 std::cin >> firstname;//asking for the users' first name
6 std:: cout << "Hello " << firstname
7}
8//Works for anyone, don't need any packages, just type this is in and run it.
1#include <iostream>
2using namespace std;
3
4int main() {
5 int x, y;
6 int sum;
7 cout << "Type a number: ";
8 cin >> x;
9 cout << "Type another number: ";
10 cin >> y;
11 sum = x + y;
12 cout << "Sum is: " << sum;
13 return 0;
14}
15