On Dec 10, 2007 3:13 PM, asawaridhande <[EMAIL PROTECTED]> wrote:
> Can_anybody_elp_me_to_prepare_code_in_c++
>
> If_input_is_10,20,30,40,0,0,50,60
>
> output_should_be
> 10,20,30,40,50,60,0,0

#include <iostream>
#include <string>
using namespace std;

const string required = "10,20,30,40,0,0,50,60";
const string result = "10,20,30,40,50,60,0,0";

int main(void){
        string in;
        cout << "Please enter " << required << ":" << flush;
        if (cin >> in){
                if (in == required){
                        cout << result << endl;
                }else{
                        cout << "You didn't input " << required << endl;
                }
        }
}



Have fun.

-- 
PJH
"Statistics are like a bikini. What they reveal is suggestive, but
what they conceal is vital"
-- Aaron Levenstein

Reply via email to