|
|
back to boardHow to make this on c++ ? Re: How to make this on c++ ? we have N element array. And we have (M+1) integers, as numaration starts form 0 to M. so, (M+1) integers will be checked in every element of the array. as, there's N elements in the array, so, final result is N*(M+1). :) ------------------------------------ #include <iostream> using namespace std; int main() { int n, m; cin >> n >> m; cout << n * (m + 1) << '\n'; return 0; } --------------------------------------- |
|
|