用户:
和砚查看:95 回复:1 评论:7 创建时间:2021-06-16T22:28:09
#include<iostream>
using namespace std;
int main() {
printf("hello, world");
return 0;
}
#include<stdio.h>
int main() {
printf("hello, world");
return 0;
}
print("hello, world")
alert("hello, world")
NOTCH___c++可以用cout
点赞0
评论
printf()也是一种输出方式
相较于cout语句,printf()用的更多
一般C++的教程书中第一个hello, world程序都是用printf()来完成的
只有少部分的教程书选用cout
上次去参加C++比赛的时候,试卷里考的都是printf(),所以我印象深刻
cout也没错
cout更方便,但是更有局限性