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
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
Physics,
6 months ago
India Languages,
6 months ago
Math,
11 months ago
Math,
11 months ago
Math,
1 year ago