C++ Online Compiler
Example: A Very Big Sum C++ Program
C
C++
C#
Java
Python
PHP
main.cpp
STDIN
Run
// A Very Big Sum C++ Program #include <iostream> using namespace std; int main() { int s = 0; cout << "Enter the size of array::\n"; cin >> s; long arr[s], sum=0; int i=0; while (i<s) { cin >> arr[i]; sum += arr[i]; i++; } // It will return the final output cout << "\nBig Sum = " << sum << endl; return 0; }
6 1000010000010001 1000010000010002 1000010000010003 1000010000010004 1000010000010005 1000010000010006
Output
Clear
ADVERTISEMENTS