Computer Science, asked by sgudu565, 1 year ago

Write a macro to display string "Cobol"

Answers

Answered by Jasleen0599
0

/* Java Program Example - Print String COBOL*/

import java.util.Scanner;

public class JavaProgram

{

public static void main(String args[])

{

String str;

Scanner scan = new Scanner(System.in);

System.out.print("Enter Your String To Be Printed : ");

str = scan.nextLine();

System.out.print("COBOL,"+ str);

}

}

OUTPUT: COBOL

Similar questions