求助,一段能成程序的C语言代码 感谢

来源:百度知道 编辑:UC知道 时间:2024/06/21 11:22:02
我是一个小学生今年5年级,对计算机很感性趣,希望哪位高手能回答一下
十分感谢

#include <iostream>
using namespace std;

int main()
{
int year;
bool IsLeapYear;
cout<<"Enter the year:";
cin >> year;
IsLeapYear=( ( year % 4 == 0 && year % 100 != 0 ) || ( year % 400== 0 ) );
if(IsLeapYear)
cout<<year<<"is a leap year"<<endl;
else
cout<<year<<"is not a leap year"<<endl;
system("PAUSE");
return int(0);
}

输出汉字字符

小学生啊,呵呵。最简单的C++代码:

程序目的:在显示屏上显示“Hello world!”
#include <iostream>

using namespace std;

int main()
{
cout<<"Hello world!"<<endl;
return 0;
}

#include <stdio.h>
int main()
{
printf("i am a boy!\n");

return;
}

你们别c#或者c++都拿来欺负小学生好不!人家要的是c语言程序!!!!!!
#include "stdio.h"