Advertisement
RnD

ray1

RnD
Nov 21st, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3.  
  4. int main(){
  5.  
  6.     float numArray[6], totalSum=0;
  7.  
  8.     for(int i=0;i<6;i++){
  9.         std::cout << "Hey, write your " << i+1 << " number here: ";
  10.         std::cin >> numArray[i];
  11.         std::cout << "\n";
  12.  
  13.         totalSum += numArray[i];
  14.     }
  15.  
  16.     std::cout << "\nYour total sum is: " << totalSum << " !";
  17.  
  18.     system("pause>nul");
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement