Computer Science, asked by aditigupta92, 1 month ago

Wap to enter the name of five colours in same line using single cout statement with one space in between​

Answers

Answered by ashblaze03
1

import java.io.*;

class Out{

public static void Print(){

int i = 0;

String a = ["blue", "red", "green", "white", "black"];

int c =0;

while (i<=4)

System.out.print(a[i] + " ");

}

}

Similar questions