用C语言,C++,Java程序输出一个字符!急

2025-02-24 13:05:07
推荐回答(4个)
回答1:

java:
public class Test2 {
public static void main(String[] args)
{
System.out.println("Hello Word");
}
}

C:
#include
main()
{
printf("Hello Word");
}
C++:
#include "iostream.h"
main()
{
cout << "Hello Word";
}

回答2:

C语言版:
#include
int main()
{
printf("hello world !");
return 0;
}

C++版:
#include
int main()
{
cout<<"hello world!"<return 0;
}

java版:
public class test{
public static void main(String args[])
{
System.out.println("hello world !");
}
}

回答3:

C语言:
#include
int main()
{
printf("Hello, world!\n");
return 0;
}

C++语言:
#include
using namespace std;
int main()
{
cout << "Hello, world!" << endl;
return 0;
}
JAVA语言:
文件名:HelloWorld.java
public class HelloWorld
{
public static void main(String args[])
//向屏幕上写字符串"HelloWorld!"
{
System.out.println("HelloWorld!");
}
}
你直接运行就行了汗..

回答4:

printf