fork download
  1. #include<iostream>
  2.  
  3. int main()
  4. {
  5. int val = 10;
  6.  
  7.  
  8. while (val >= 0)
  9. {
  10.  
  11. std::cout <<"10 - "<<val<<" = "<<10-val<<std::endl;
  12.  
  13. --val;
  14. }
  15.  
  16.  
  17.  
  18. return 0;
  19.  
  20.  
  21. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
10 - 10 = 0
10 - 9 = 1
10 - 8 = 2
10 - 7 = 3
10 - 6 = 4
10 - 5 = 5
10 - 4 = 6
10 - 3 = 7
10 - 2 = 8
10 - 1 = 9
10 - 0 = 10