#include<stdio.h>
#include<math.h>
#include<time.h>
#include<conio.h>
#include<iostream.h>void main()
{
double a,b,sum;
time_t current_time;
struct tm *current_tm; time(¤t_time);
current_tm=gmtime(¤t_time);
cout<<"VC can use <iostream.h>";
cout<<"VC can use <time.h>";
printf("Greenwich Mean Time=%s\n",asctime(current_tm));
cout<<"VC can use <stdio.h>\n";
a=123.0;
b=456.0;
sum=fmod(b,a);
printf("sum is %e\n",sum);
cout<<"please input a char to test <conio.h>\n";
getch();
cout<<"VC can use <conio.h>\n";
getch();
}
这个程序中,cout语句是做什么用的啊?最后运行没有看出这个语句的效果啊
#include<math.h>
#include<time.h>
#include<conio.h>
#include<iostream.h>void main()
{
double a,b,sum;
time_t current_time;
struct tm *current_tm; time(¤t_time);
current_tm=gmtime(¤t_time);
cout<<"VC can use <iostream.h>";
cout<<"VC can use <time.h>";
printf("Greenwich Mean Time=%s\n",asctime(current_tm));
cout<<"VC can use <stdio.h>\n";
a=123.0;
b=456.0;
sum=fmod(b,a);
printf("sum is %e\n",sum);
cout<<"please input a char to test <conio.h>\n";
getch();
cout<<"VC can use <conio.h>\n";
getch();
}
这个程序中,cout语句是做什么用的啊?最后运行没有看出这个语句的效果啊
===========
cout是输出字符串到屏幕.
看不到效果是:你把#include<iostream.h>
更改为:
#include<iostream>
using namespace std;在使用标准头文件的时候尽量使用新的标准头文件,新的一般没有.h结尾,有的还会在头上加上个C.