Advertisement
Amr1998

Untitled

Aug 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. { int n,m;
  7. int sum =0;
  8. cin>>n>> m;
  9. for(int i=1;i<=n;i++){
  10. for(int j=1;j<=m;j++){
  11. if((i+j)%5==0){
  12. sum++;
  13. }
  14. }
  15. }
  16. cout<<sum;
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement