首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
Program ex0418
implicit none
real::a,b,c
read(*,*)a,b,c
write(*,*)a+b+c
stop
end
阅读全部 | jude1990 贴于 2012年8月19日 17:53     hide bbsi
Program ex0417
implicit none
integer(kind=2)::a
read(*,*)a
write(*,*)a
stop
end
阅读全部 | jude1990 贴于 2012年8月19日 17:40     hide bbsi
Program ex0501
implicit none
logical(kind=2)::a,b
a=.true.
b=.false.
write(*,*)a,b
stop
end
阅读全部 | jude1990 贴于 2012年8月19日 17:38     hide bbsi
Program ex0501
implicit none
real(kind=4)::speed
write(*,*)"speed:"
read(*,*) speed
if (speed>100.0) then
   write(*,*) "Slow down."
endif
stop
end
阅读全部 | jude1990 贴于 2012年8月19日 12:01     hide bbsi
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
void main(void)
{
    double x1,y1,z1,x2,y2,z2;
    
    double d1,d2,d,p,s;
    
    char name[20];
    
    int k;
......................
阅读全部 | 纯哲学 贴于 2012年8月18日 22:59     hide bbsi
Program ex0430
integer::a=1
real::b=2.0
complex::c=(1.0,2.0)
character(len=20)::str="Fortran 90"
write(*,*) a,b,c,str
stop
end
阅读全部 | jude1990 贴于 2012年8月18日 15:09     hide bbsi
Program ex0401
integer a
a=3
write(*,*) "a=",a
stop
end
阅读全部 | jude1990 贴于 2012年8月18日 15:05     hide bbsi
#include<iostream>
//#include<iomanip>
//#include<cmath>
using namespace std;
template <class T>
T max(T a[],int n)
{
    T max=a[0];
    for (int i=0;i<n;i++)
        if (a[i]>max)
            max=a[i];
    return max;
......................
阅读全部 | jude1990 贴于 2012年8月17日 14:59     hide bbsi
#include<iostream>
//#include<iomanip>
//#include<cmath>
using namespace std;
void swap(int &,int &);
void main()
{
    int a=2,b=10;
    swap(a,b);
    cout<<"a="<<a<<",b="<<b<<endl;
}
void swap(int &a,int &b)
......................
阅读全部 | jude1990 贴于 2012年8月17日 08:49     hide bbsi
#include<iostream>
//#include<iomanip>
//#include<cmath>
using namespace std;
class Date
{
    int year,month,day;
public:
    Date(int y,int m,int d)
    {
        year=y;
        month=m;
......................
阅读全部 | jude1990 贴于 2012年8月16日 23:31     hide bbsi
上一页 291 292 293 294 295 296 297 298 299 300 下一页