by Dinesh Thakur

 

#include<iostream.h>

#include<conio.h>
void main()
   {
        int code;
        clrscr();
        cout<<"Enter the color code : ";
        cin>>code;
        if(code==1 )
             {
                     cout<<"Color is Red";
              }
        else if(code==2)
             {
                     cout<<" Color is Green";
             }
       else if(code==3)
            {
                     cout<<" Color is White";
             }
      else if(code==4)
             {
                    cout<<"Color is Yellow";
              }
      else
             {
                   cout<<" No Color code defined";
              }
                   cout<<endl;
                   cout<<"End of the Program ";
                   getch();
}

Ladder If Statement





About Us

Dinesh ThakurDinesh Thakur is a Columinist and designer with strong passion and founder of Computer Notes. if you have any ideas or any request Find Dinesh Thakur on
linkedin FaceBook Twitter Google Plus