Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Problem

By: a guest on Oct 25th, 2013  |  syntax: None  |  size: 0.88 KB  |  hits: 41  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //I'm trying when the programm
  2. #include <iostream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int addition (int a, int b)
  8. {
  9.  int g;
  10.  g=a+b;
  11.  return (g);
  12.  
  13. }
  14.  
  15. int subtraction (int c, int d)
  16. {
  17.  int e;
  18.  e=c-d;
  19.  return (e);
  20. }
  21.  
  22. int main()
  23. {
  24. call:
  25.  int z;
  26.  int y;
  27.  int x;
  28.  int v;
  29.  int n;
  30.  int o;
  31.  string mystring;
  32.  
  33.  
  34.  cout << "Hello, what is your name? ";
  35.  getline (cin, mystring);
  36.  cout << "Hello " << mystring << ".\n";
  37.  
  38.  cout << "Enter a number \n";
  39.  cin >> x;
  40.  cout << "Enter another number \n";
  41.  cin >> y;
  42.  cout << "Enter the final number \n";
  43.  cin >> z;
  44.  
  45.  v = z+y+x;
  46.  
  47.  while (v>0){
  48.     cout << v << ", ";
  49.     v--;
  50.  }
  51.  cout << "End of while loop\n";
  52.  
  53.   n=addition(5,3);
  54.   o=subtraction(5,3);
  55.  
  56.  do{
  57.     cout << "enter in a number\n";
  58.     cin >> v;
  59.     cout << "The result is " << v+o << ".\n";
  60.  
  61.  } while (v+o!= 50);
  62.  
  63.  goto call;
  64.  
  65.  return 0;
  66. }