Search
 
SCRIPT & CODE EXAMPLE
 

CPP

how to scan array in c++

# include <bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	int a[n];
	for(int i =0;i<n;i++){
		cin>>a[i];
	}
	for(int i =0;i<n;i++){
		cout<<a[i];
	}
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: decltype in c++ 
Cpp :: c++ factorial 
Cpp :: initialize 2d vector 
Cpp :: c++ programming language 
Cpp :: c++ get ascii value of char 
Cpp :: double to int c++ 
Cpp :: matrix transpose in c++ 
Cpp :: find max element in array c++ 
Cpp :: on component begin overlap c++ 
Cpp :: c++ check palindrome 
Cpp :: c++ standard library source 
Cpp :: continue c++ 
Cpp :: c++ call by reference 
Cpp :: pointer address to string 
Cpp :: sort vector in reverse order c++ 
Cpp :: c++ output 
Cpp :: how to sort in c++ 
Cpp :: C++ break with for loop 
Cpp :: Reverse Level Order Traversal cpp 
Cpp :: union of two arrays leetcode 
Cpp :: input cpp 
Cpp :: cpp getter as const 
Cpp :: insert image using set atribute 
Cpp :: doubly linked list in cpp 
Cpp :: unordered_map contains key 
Cpp :: after login redirect to dashboard in nuxt 
Cpp :: how to remove first element from vector c++ 
Cpp :: vector iterating 
Cpp :: reverse an array in c++ stl 
Cpp :: c++ print 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =