Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int i,r;
- cin >>i>>r;
- int n, dins=0, fora=0;
- while (cin >>n) {
- if (n<=r and n>=i) dins+=n;
- else ++fora;
- }
- cout <<"Sum Inside: "<<dins<<endl;
- cout <<"Num Outside: "<<fora<<endl;
- }
- //By Patata
Advertisement
Add Comment
Please, Sign In to add comment