當前位置:首頁 » 編程軟體 » vfp編程

vfp編程

發布時間: 2022-01-18 03:36:09

『壹』 VFP怎麼編程

ABC和BAC 就認為是重復嗎?

『貳』 vfp編程。。數字程序

for i=100 to 999
a=FLOOR(i/100)
b=FLOOR((i-a*100)/10)
c=mod(i,10)
if a*a*a+b*b*b+c*c*c=i
?i
endif
endfor

『叄』 vfp編程,求編程

#include <iostream>
using namespace std;
class Coordinate
{
// 友元函數
friend void display(Coordinate &coor);
public:
Coordinate(int x, int y)
{
m_iX = x;
m_iY = y;
}
public:
int m_iX;
int m_iY;
};

void display(Coordinate &coor)
{
cout << "m_iX:" << coor.m_iX << endl;
cout << "m_iY:" << coor.m_iY << endl;
}

int main(void)
{
Coordinate coor(1,2);
display(coor);
return 0;
}

『肆』 vfp程序編程

1
set talk off
clear
i=10
do while .t.
j=i*i-168
if j>0 then
k=sqrt(j)
if k=int( k) then
?k-100
exit
endif
endif
i=i+1
enddo
set talk on
return
2由於題目不需要輸入年,所以程序沒有判斷潤年的情況,2月天數設為28
set talk off
clear
dime mon(12)
mon(1)=31
mon(2)=28
mon(3)=31
mon(4)=30
mon(5)=31
mon(6)=30
mon(7)=31
mon(8)=31
mon(9)=30
mon(10)=31
mon(11)=30
mon(12)=31
INPUT "請輸入月份:" TO m1
INPUT "請輸入天數:" TO d1
s=0
for i=1 to m1-1
s=s+mon(i)
next
?s+d1
set talk on
return

3
set talk off
clear
dime a(3)
input "x=" to a(1)
input "y=" to a(2)
input "z=" to a(3)
for i=1 to 2
for j=i+1 to 3
if a(i)>a(j) then
t=a(i)
a(i)=a(j)
a(j)=t
endif
next j
next i
?a(1),a(2),a(3)

set talk on

return

『伍』 VFP怎麼編程

clear
dime a(10)
for i=1 to 10
input to a(i)
endfor
max=a(1)
min=a(1)
for i=2 to 10
if max<a(i)
max=a(i)
endif
if min>a(i)
min=a(i)
endif
endfor
"10個數中最大數為:",max
"10個數中最i小數為:",min
return

『陸』 關於VFP編程……

1、
**計算S=1-2+3-4……-100
clear
s=0
for i=1 to 100
if mod(i,2)<>0
s=s+i
else
s=s-i
endif
endfor
?"S=1-2+3-4……-100的結果為:",s
2、
**輸出1到100以內能被3整除不能被5整除得整數
clear
for i=1 to 100
if mod(i,3)=0.and.mod(i,5)<>0
?i
endif
endfor

『柒』 關於VFP編程:1!+3!+5!+...+N!

將accept改成INPUT就行了
我樣:
INPUT "請輸入一個數:"to n

『捌』 VFP編程序。。。。

input '請輸入一個整數:" to s
?iif(mod(s,3)=0,s*3,"「該數不能被三整除")

input '請輸入一個整數(1-9):" to s
do case
case s=1
?'one'
case s=2
?'two'
........中間自己加
case s=9
?'nine'
endcase

i=1
s=0
do while i<=100
s=s+1/i
i=i+1
enddo
?s

s=0
for i=1 to 100
s=s+1/i
endfor
?s

『玖』 VFP編程序,懂VFP的來!

Input 'Please type the first number : ' to a
Input 'Please type the second number : ' to b
Input 'Please type the third number : ' to c
Input 'Please type the fourth number : ' to d
Input 'Please type the fifth number : ' to e
Return Iif(a/2=int(a/2),a,0)+Iif(b/2=int(b/2),b,0)+Iif(c/2=int(c/2),c,0)+Iif(d/2=int(d/2),d,0)+Iif(e/2=int(e/2),e,0)
&& Save the text to file p4.prg

『拾』 vfp 就是編程嗎

VFP准確的是資料庫管理,它支持結構化編程和面向對象編程,它應該說還不算專業的程序設計軟體,主要是管理資料庫。

熱點內容
mysql密碼忘記了怎麼 發布:2025-03-18 01:23:00 瀏覽:857
java與oracle 發布:2025-03-18 01:18:05 瀏覽:704
怎麼給win7電腦文件加密 發布:2025-03-18 01:10:41 瀏覽:988
python生成隨機數 發布:2025-03-18 01:10:40 瀏覽:94
手機存儲卡怎麼設置 發布:2025-03-18 01:04:26 瀏覽:213
背演算法好處 發布:2025-03-18 01:02:18 瀏覽:57
win7添加刪除在哪個文件夾 發布:2025-03-18 01:02:13 瀏覽:705
蘋果寫源碼 發布:2025-03-18 00:50:47 瀏覽:363
生存源碼 發布:2025-03-18 00:50:46 瀏覽:351
bika安卓怎麼下載 發布:2025-03-18 00:43:49 瀏覽:219