#include <iostream> using namespace std; int add(int x, int y, int z) { return (x + y + z); } int main() { int x, y, z, sum; cout << "Sum of three arguements\n" << "----------------------------\n" << "Please enter three arguements: "; cin >> x >> y >> z; sum = add(x, y,z); cout << "____________________________\n" << x << " + " << y << " + " << z << endl << "The sum these three arguements are: " << sum; return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter