fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n, i, k;
  8. cin>>n ; k=n;
  9. for (i=1; i<=n; i++) cout << i<< " + "<<k<<" = "<<k+n<<endl;
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 4292KB
stdin
5
stdout
1 + 5 = 10
2 + 5 = 10
3 + 5 = 10
4 + 5 = 10
5 + 5 = 10