OKaNaRslaA

ARAYreturnSchleife

Jul 9th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Online C++ Compiler.
  4. Code, Compile, Run and Debug C++ program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <iostream>
  10.  
  11. using namespace std;
  12.  
  13. struct CASA
  14. {
  15. int A;
  16. int a;
  17. };
  18.  
  19. CASA
  20. cin_Array ()
  21. {
  22. CASA INput[10];
  23.  
  24. for (int A = 0; A < 4; A++)
  25. {
  26.  
  27. cout << "Bitte geben Sie die Zahl " << A << "ein: ";
  28. cin >> INput[A].a;
  29. cout << endl << "Im array" << A << " steht der Wert a = : " <<
  30. INput[A].a << endl;
  31.  
  32. }
  33. return INput[10];
  34.  
  35. }
  36.  
  37. int Berechnung (CASA INput)
  38. {
  39.  
  40. int ergebnis;
  41. cout<<ergebnis.INput[1].a;
  42. return ergebnis;
  43. }
  44.  
  45. int
  46. main ()
  47. {
  48. CASA CASA = cin_Array ();
  49. Berechnung (CASA);
  50. cout << "Hello World" << endl;
  51.  
  52.  
  53. return 0;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment