Advertisement
payjack

Untitled

Nov 7th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. # include <iostream>
  2. using namespace std;
  3.  
  4. int main () {
  5.  
  6. int sqr;
  7. int avg = 0;
  8. int listSize;
  9. cin>>listSize;
  10. int stuff [listSize];
  11.  
  12. for (int m = 0; m<listSize; m++)
  13. {
  14. sqr=listSize*listSize;
  15. cout<<sqr[m];
  16. }
  17. cout<<endl;
  18. cout<<"the average is: ";
  19. int total = 0;
  20. for (int m = 0; m<listSize; m++)
  21. {
  22. total = total + stuff[m];
  23. double avg = total/(listSize+1);
  24. }
  25. return 0;
  26. }# include <iostream>
  27. using namespace std;
  28.  
  29. int main () {
  30.  
  31. int sqr;
  32. int avg = 0;
  33. int listSize;
  34. cin>>listSize;
  35. int stuff [listSize];
  36.  
  37. for (int m = 0; m<listSize; m++)
  38. {
  39. sqr=listSize*listSize;
  40. cout<<sqr[m];
  41. }
  42. cout<<endl;
  43. cout<<"the average is: ";
  44. int total = 0;
  45. for (int m = 0; m<listSize; m++)
  46. {
  47. total = total + stuff[m];
  48. double avg = total/(listSize+1);
  49. }
  50. return 0;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement