btcq.net
当前位置:首页 >> 打印输出hEllo worlD >>

打印输出hEllo worlD

#includevoid main(){printf("Hello world");}

1,安装jdk;2,配置环境变量;3,新建D:/Test.java文件;4,文件内容如下:public class Test{ public static void main(String args[]){ System.out.println("Hello World."); }}5,打开命令行,录入:cmd6,cd d:7,javac Test.java8,java Test命令行窗口打印结果:Hello World.程序结束.

if (console.write("hello") is object) console.write("hello");else console.write(" world!");

void output(){ printf("Hello,World!");}

编程吗?C语言的话是这样:#include int main(void) { printf("hello world!\n"); printf("hello world!\n"); printf("hello world!\n"); printf("hello world!\n"); printf("hello world!\n"); printf("hello world!\n"); printf("hello world!\n"); printf("hello world!\n"); printf("hello world!\n"); printf("hello world!\n"); return 0; }

#include<stdio.h>#include <stdlib.h> int main() { printf("hello world"); system("pause"); return 0; }

#include int main () { int n; scanf("%d", &n); if (0 == n) { printf("Hello World\n"); } else if (n > 0) { printf("He\n"); printf("ll\n"); printf("o \n"); printf("Wo\n"); printf("rl\n"); printf("d\n"); } else { printf("H\n"); printf("e\n"); printf("l\n

我没有运行这个程序,但是我觉得问题在于字符串的末尾必须有'\0'以表明字符串结束了,所以你的程序应该加一句ch1[i]='\0';当然这个程序有可能溢出.

System.out.printf("%s","Hello World");System.out.printf("%s%s","Hello"," World");System.out.printf("%s W%s","Hello","orld");System.out.printf("H%s W%s","ello","orld");System.out.printf("He%s W%s","llo","orld

网站首页 | 网站地图
All rights reserved Powered by www.btcq.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com