[ create a new paste ] login | about

Link: http://codepad.org/5Yxgyitl    [ raw code | output | fork ]

iamyeasin - C++, pasted on Feb 3:
#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s1;

    printf("###EXIT: Press 0 & enter to exit the program.##\n\n");

    while(cin>>s1)
    {
        if(s1 == "0") break;

        if(s1 == "Black" || s1 == "black" || s1 == "BLACK")
        {
            printf("Resistance: 0\n");
        }
        else if(s1 == "Brown" || s1 == "brown" || s1 == "BROWN")
        {
            printf("Resistance: 1\n");
        }
        else if(s1 == "RED" || s1 == "red" || s1 == "RED")
        {
            cout<<"Resistance : 2"<<endl;
        }
        else if(s1 == "ORANGE" || s1 == "orange" || s1 == "Orange")
        {
            cout<<"Resistance: 3"<<endl;
        }
        else if(s1 == "Yellow" || s1 == "yellow" || s1 == "YELLOW")
        {
            cout<<"Resistance: 4"<<endl;
        }
        else if(s1 == "Green" || s1 == "green" || s1 == "GREEN")
        {
            cout<<"Resistance: 5"<<endl;
        }
        else if(s1 == "Blue" || s1 == "blue" || s1 == "BLUE")
        {
            cout<<"Resistance: 6"<<endl;
        }
        else if(s1 == "Violet" || s1 == "violet" || s1 == "VIOLET")
        {
            cout<<"Resistance: 7"<<endl;
        }
        else if(s1 == "Grey" || s1 == "GREY" || s1 == "grey")
        {
            cout<<"Resistance: 8"<<endl;
        }
        else if(s1 == "White" || s1 == "white" || s1 == "WHITE")
        {
            cout<<"Resistance: 9"<<endl;
        }
        else
        {
            cout<<"Sorry not recognizable! Please check spelling or make sure that all"<<endl;
            cout<<"characters are uppercase or lowercase or every character are lower case "<<endl<<"except first one.\n"<<endl;
        }

    }


    return 0;
}


Output:
1
Line 23: error: bits/stdc++.h: No such file or directory


Create a new paste based on this one


Comments: