All you need to do is to print the first 10 multiples of the number given in input.
Example:
Input: 3
Output:
3 6 9 12 15 18 21 24 27 30
Approach:
C++
#include <bits/stdc++.h>using namespace std;int main(){int n = 3;for (int i = 1; i <= 10; i++)cout << n * i << "\n";return 0;}
No comments:
Post a Comment