Header Ads

Header ADS

URI 1037 Interval Solution in C++

URI 1037 👀 Interval 👀Solution in C++

Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
https://programminglife77.blogspot.com/2018/10/uri-1037-interval-solution-in-c.html


URI 1037 👀 Interval 👀Solution in C++

#include <iostream>
using namespace std;

int main(){
    float n;

    cin >> n;
    if(n < 0 || n > 100){
        cout << "Fora de intervalo" << endl;

    }else{
        if(n >= 0 && n <= 25){
            cout << "Intervalo [0,25]" << endl;
        }else if(n > 25 && n <= 50){
            cout << "Intervalo (25,50]" << endl;
        }else if(n > 50 && n <= 75){
            cout << "Intervalo (50,75]" << endl;
        }else{
            cout << "Intervalo (75,100]" << endl;
        }
    }

 return 0;}


No comments

URI 1070 Six Odd Numbers Solution in C++

URI 1070 Six Odd Numbers Solution in C++ Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just fin...

Powered by Blogger.