diff options
author | zedarider <ymherklotz@gmail.com> | 2016-02-18 11:37:45 +0000 |
---|---|---|
committer | zedarider <ymherklotz@gmail.com> | 2016-02-18 11:37:45 +0000 |
commit | af98ee7ff28cff97f5f29a5d9e65f9153531b0ee (patch) | |
tree | 86bfc53a0bc04512ac2936ee067a2b43e901e688 /w4.cpp | |
download | imperial_2015-af98ee7ff28cff97f5f29a5d9e65f9153531b0ee.tar.gz imperial_2015-af98ee7ff28cff97f5f29a5d9e65f9153531b0ee.zip |
Imperial C++ Directory
These are all the projects I’ve been working on at university.
Diffstat (limited to 'w4.cpp')
-rw-r--r-- | w4.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +#include <iostream> +#include <vector> +#include <sstream> + +using namespace std; + +struct point { + double x; + double y; + + string returnString() { + stringstream ss; + ss << "(" << x << ", " << y << ")"; + return ss.str(); + } +}; + +int main() { + point userPt; + + cout << "Please enter a point: "; + cin >> userPt.x >> userPt.y; + cout << "Your point was: " << userPt.returnString() << endl; +} |