Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- int main(){
- float numArray[6], totalSum=0;
- for(int i=0;i<6;i++){
- std::cout << "Hey, write your " << i+1 << " number here: ";
- std::cin >> numArray[i];
- std::cout << "\n";
- totalSum += numArray[i];
- }
- std::cout << "\nYour total sum is: " << totalSum << " !";
- system("pause>nul");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement