cs161AWinter2024/toString1.cpp

15 lines
335 B
C++

#include <iostream>
using namespace std;
int main(){
// Here's an example of a progrm that takes two numbers
// converts them to strings
// then glues them together with string concatenation
int num1 = 30;
double num2 = 2355.34;
cout << "Here's your output: " << to_string(num1) + to_string(num2) << endl;
return 0;
}