/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { // your code goes here } }
#include<iostream.h>
#include<conio.h>
void main()
{
cout<<"enter your name";prog.cpp:3:1: error: unknown type name 'import'
import java.util.*;
^
prog.cpp:3:12: error: expected ';' after top level declarator
import java.util.*;
^
;
prog.cpp:4:1: error: unknown type name 'import'
import java.lang.*;
^
prog.cpp:4:12: error: expected ';' after top level declarator
import java.lang.*;
^
;
prog.cpp:5:1: error: unknown type name 'import'
import java.io.*;
^
prog.cpp:5:12: error: expected ';' after top level declarator
import java.io.*;
^
;
prog.cpp:10:8: error: expected ':'
public static void main (String[] args) throws java.lang.Exception
^
:
prog.cpp:10:27: error: C++ requires a type specifier for all declarations
public static void main (String[] args) throws java.lang.Exception
^
prog.cpp:10:36: error: expected ')'
public static void main (String[] args) throws java.lang.Exception
^
prog.cpp:10:26: note: to match this '('
public static void main (String[] args) throws java.lang.Exception
^
prog.cpp:10:41: error: expected ';' at end of declaration list
public static void main (String[] args) throws java.lang.Exception
^
;
prog.cpp:14:2: error: expected ';' after class
}
^
;
11 errors generated.
Standard output is empty