Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- int main()
- {
- int pocetok,kraj,b=0,zbir=0;
- cin>>pocetok>>kraj;
- for(int a=1;a<kraj+1;a++){
- b+=1;
- if(b==4){
- b=1;
- }
- if(a>pocetok){
- zbir+=b;
- }
- }
- cout<<zbir<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement