#include <stdio.h>
int main() {
printf("这是C语言的代码。\n");
return 0;
}
#include <iostream>
int main() {
std::cout << "这是C++的代码。" << std::endl;
return 0;
}
using System;
class Program {
static void Main() {
Console.WriteLine("这是C#的代码。");
}
}
C语言:
printf
函数进行输出。C++:
std::cout
进行输出,需要包含<iostream>
头文件。C#:
Console.WriteLine
进行输出,需要使用System
命名空间。上一篇:c#连接mysql
下一篇:c# 调用c++ dll
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站