Print the Numbers

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] = {563039458};

    for (int i = 0i < ni++)
        cout << a[i<< " ";

    return 0;
}


No comments:

Post a Comment