Computer Science, asked by eyefinity, 11 months ago

Write a program to assign a character and print color of the rainbow according to the following condition :
B=Blue
I=Indigo

Answers

Answered by tejasvarshney
1

class rainbow

{

public static void main();

 {

 String r, o, y, g, b, i, v;

          r = “red”;

 o = “orange”;

 y = “yellow”;  

 g = “green”;

 b = “blue”;

 i = “indigo”;

 v = “violet”;

 System.out.println(r);  

 System.out.println(o);

 System.out.println(y);

 System.out.println(g);

 System.out.println(b);

 System.out.println(i);

 System.out.println(v);

}

}

Similar questions