#include <iostream>using namespace std; int main() { int z[6]; int m; for (int i = 0; i < 5; i++) { scanf_s("%d\n", &z[i]); } for (int i = 0; i <= 5; i++) { printf_s("%d\n", z[i]); } return 0;}
1 2 3 4 5 6
prog.cpp: In function 'int main()': prog.cpp:9:24: error: 'scanf_s' was not declared in this scope scanf_s("%d\n", &z[i]); ^ prog.cpp:13:24: error: 'printf_s' was not declared in this scope printf_s("%d\n", z[i]); ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!