program displayTime
integer date_time(8)
character*10 b(3)
call date_and_time(b(1), b(2), b(3), date_time)
write(*,*)date_time(1),date_time(2),date_time(3),date_time(4),date_time(5),date_time(6)
stop
end
阅读全部
|
jude1990
贴于 2012年8月26日 18:12
hide
bbsi
module bank
implicit none
private money
public loadMoney,saveMoney,report
integer::money=1000000
contains
subroutine loadMoney(num)
implicit none
integer::num
money=money-num
return
end subroutine
......................
阅读全部
|
jude1990
贴于 2012年8月26日 17:49
hide
bbsi
module fun
contains
function add(a,b)
integer a,b,add
add=a+b
return
end function
end module
program main
use fun
......................
阅读全部
|
jude1990
贴于 2012年8月25日 22:16
hide
bbsi
module global
integer::a,b
! common a,b
end module
program ex0834
use global
implicit none
a=1
b=2
call sub
end program
......................
阅读全部
|
jude1990
贴于 2012年8月25日 17:58
hide
bbsi
Program ex1007
implicit none
integer,pointer::p(:)
integer,target::a(10)=(/10,24,33,42,54,8,90,3,4,23/)
interface
function getmin(p)
integer,pointer::p(:)
integer,pointer::getmin
end function
end interface
......................
阅读全部
|
jude1990
贴于 2012年8月25日 14:13
hide
bbsi
Program ex1004
implicit none
integer,pointer::a(:)
integer,target::b(5)=(/1,2,3,4,5/)
a=>b
write(*,*)a
a=>b(1:3)
write(*,*)a
a=>b(1:5:2)
write(*,*)a
......................
阅读全部
|
jude1990
贴于 2012年8月25日 11:14
hide
bbsi
Program ex1001
implicit none
character(len=20)::string
integer,target ::a=1
integer,pointer::p
p=>a
write(*,*)p
a=2
write(*,*)p
p=3
write(*,*)a
......................
阅读全部
|
jude1990
贴于 2012年8月25日 10:32
hide
bbsi
Program ex0901
implicit none
open (unit=10,file='Hello.txt')
write(10,*)"Hello"
stop
end
阅读全部
|
jude1990
贴于 2012年8月25日 10:10
hide
bbsi
#include <stdio.h>
int main(void)
{
unsigned int original = 0xABC;
unsigned int result = 0;
unsigned int mask = 0xF; /* Righmost four bits */
printf("\n original = %X", original);
/* Insert first digit in result */
result |= original&mask; /* Put right 4 bits from original in result */
......................
阅读全部
|
format_yang
贴于 2012年8月24日 22:55
hide
bbsi