c++
java
python
其他通用问题
简单的helloworld
#include <iostream>
using namespace std;
class student
{
private:
int num;
int score;
public:
void setdata()
{
cin >> num;
cin >> score;
}
void displyadata()
{
cout << "num:" << num << endl;
cout << "score:" << score << endl;
};
};
student s1, s2;
int main()
{
s1.setdata();
s2.setdata();
s1.displyadata();
s2.displyadata();
cout << "Hello World!" << endl;
return 0;
}
import com.hello;
public class App {
public static void main(String[] args) throws Exception {
hello h = new hello();
h.display();
System.out.println("Hello, World!");
}
}