#include<math.h> #include <iostream> using namespace std;int main(){ int a, b, c, d = 19; float e, f, g; cin>>a; int *ar = new int[a]; for (int i = 0; i<a ; i++) { ar[i] = input.nextInt(); c = c + ar[i]; } }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:12:11: error: ‘input’ was not declared in this scope ar[i] = input.nextInt(); ^~~~~ prog.cpp:12:11: note: suggested alternative: ‘ino_t’ ar[i] = input.nextInt(); ^~~~~ ino_t
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!