tqkAAAVisual-foxpro程序设计练习题.docVIP

  • 0
  • 0
  • 约8.25千字
  • 约 15页
  • 2021-02-21 发布于辽宁
  • 举报
Visual foxpro程序设计练习题 1、?求[10,1000]内所有能被被7和9中至少一个数整除的整数之个数。 答案:236 n=0 for i=10 to 1000 ? if mod(i,7)=0 or mod(i,9)=0 ?????? n=n+1 ? endi endf ?n 2、?求[101,299]内所有能被2整除但不能同时被3和5整除的整数之和。 答案:18630 s=0 for i=101 to 299 ? if mod(i,2)=0 and not (mod(i,3)=0 and mod(i,5)=0) ?????? s=s+i ? endi endf ?s 3、求100

文档评论(0)

1亿VIP精品文档

相关文档