fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n,r;cin>>n>>r;
  7. for(int i=1;i<=r;i++){
  8. printf("%d * %d = %d",n,i,n*i);
  9. cout<<endl;
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0s 4964KB
stdin
5 17
stdout
5 * 1 = 5
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
5 * 5 = 25
5 * 6 = 30
5 * 7 = 35
5 * 8 = 40
5 * 9 = 45
5 * 10 = 50
5 * 11 = 55
5 * 12 = 60
5 * 13 = 65
5 * 14 = 70
5 * 15 = 75
5 * 16 = 80
5 * 17 = 85