[ create a new paste ] login | about

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

C++, pasted on Aug 6:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 while (i<a)
    { if ( n[i]== "1:00"||n[i]=="11:00")
        {  cout<<"30.000"<<endl; }
      else if (n[i]=="2:00"||n[i]=="10:00")
        { cout<<"60.000"<<endl; }
      else if (n[i]=="3:00"||n[i]=="9:00")
        { cout<<"90.000"<<endl; }
      else if (n[i]=="4:00"||n[i]=="8:00")
        { cout<<"120.000"<<endl; }
      else if (n[i]=="5:00"||n[i]=="7:00")
        { cout<<"150.000"<<endl; }
      else if (n[i]=="6:00")
        { cout<<"180.000"<<endl; }
      else if (n[i]=="12:00")
        { cout<<"0.000"<<endl; }
            }


Output:
1
2
Line 1: error: expected unqualified-id before 'while'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: