Given N numbers in the input. Print these numbers in the same order as they come in the input.
Example:
Input: n = 5, a = [56,30,3,94,58]
Output: 56 30 3 94 58
Approach
C++
#include <bits/stdc++.h>using namespace std;int main(){int n = 5;int a[n] = {56, 30, 3, 94, 58};for (int i = 0; i < n; i++)cout << a[i] << " ";return 0;}
No comments:
Post a Comment