hello world程序
来源:互联网 发布:爱思唯尔数据库英文 编辑:程序博客网 时间:2024/05/29 02:46
一、VS.net2005的下的C++
//标准输出
#include <tchar.h>
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
std::cout<<"hello world"<<std::endl;
return 0;
}
//文件输出
#include <tchar.h>
#include <fstream>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char t[30];
ofstream fo("c://123.txt");
fo<<"hello world"<<endl;
fo.close();
ifstream fi("c://123.txt");
while(!fi.eof())
{
fi>>t;
cout<<t<<' ';
}
fi.close();
return 0;
}
三、C#
//标准输出
//Program.cs
using System;
namespace ConsoleApplication1
{
class Program2
{
static void Main(string[] args)
{
System.Console.Out.WriteLine("hello world");
}
}
}
四、Java
//标准输出
//Program.java
import java.io.*;
class Program{
static void main (String[] args){
System.out.println("helloworld");
}
}
//标准输出
#include <tchar.h>
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
std::cout<<"hello world"<<std::endl;
return 0;
}
//文件输出
#include <tchar.h>
#include <fstream>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char t[30];
ofstream fo("c://123.txt");
fo<<"hello world"<<endl;
fo.close();
ifstream fi("c://123.txt");
while(!fi.eof())
{
fi>>t;
cout<<t<<' ';
}
fi.close();
return 0;
}
三、C#
//标准输出
//Program.cs
using System;
namespace ConsoleApplication1
{
class Program2
{
static void Main(string[] args)
{
System.Console.Out.WriteLine("hello world");
}
}
}
四、Java
//标准输出
//Program.java
import java.io.*;
class Program{
static void main (String[] args){
System.out.println("helloworld");
}
}
- 一个Hello World程序
- hello world程序
- QT Hello World 程序
- hello world程序
- ABAP程序Hello World
- Win32 Hello World程序
- Hello World程序
- Hello World程序
- Hello world!程序
- C# 程序Hello World
- 程序Hello World解析
- Scala程序hello world
- 第一个“Hello World”程序
- SDK的hello world程序!
- 一个简单hello world程序
- ACIS 的 hello world 程序
- OK6410裸机程序---hello world
- OK6410裸机程序---hello world
- 3DS Max建模 植物的触碰效果
- epo.c
- EditText输入字符控制(二)
- C#语法
- 链表逆序
- hello world程序
- js去除字符串前后空格的方法
- tst1
- 文件注释符号
- 文件上传与中文乱码问题
- MySQL mysqld 5.6.2-m5 所有 配置选项
- PHP安全问题
- 3合一版WTRecord项目说明
- CCS笔记