Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //============================================================================
- // Name : HelloWorld.cpp
- // Author : smalinux
- // Version :
- // Copyright : Your copyright notice
- // Description : Hello World in C++, Ansi-style
- //============================================================================
- #include <iostream>
- #include <string>
- #include<iomanip>
- using namespace std;
- int main() {
- // ----------------------------------------------------------------------
- int N = 0;
- int arr[1000];
- cin >> N;
- if(N >= 2 && N <= 1000) {
- // - Insertion
- for(int i = 0; i < N; i++) {
- cin >> arr[i];
- if(arr[i] >= -1e5 && arr[i] <= 1e5)
- continue;
- else
- return -1;
- }
- //
- for(int i = 0; i < N; i++) {
- if(arr[i] <= 10)
- cout << "A[" << i << "] = " << arr[i] << endl;
- }
- }
- // ----------------------------------------------------------------------
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement