青岛农业大学农业知识综合3 (吉林农业大学农业知识综合3)

2024年浙江农林大学《341农业知识综合三[专业硕士](农业信息化)》考研全套

新疆农业大学农业知识综合341,青岛农业大学农业知识综合3

目录

1.考研真题

[真题]农业硕士《341农业知识综合三》名校考研真题汇总[查看目录]

说明:本科目考研真题不对外公布(暂时难以获得),通过分析参考教材知识点,精选了有类似考点的其他院校相关考研真题,以供参考。

2.教材教辅

[电子书]谭浩强《C程序设计》(第5版)典型习题详解[查看目录]

[电子书]谭浩强《C程序设计》(第5版)配套题库【考研真题精选+章节题库】[查看目录]

[电子书]谢希仁《计算机网络》(第7版)配套题库【考研真题精选(部分视频讲解)+章节题库】[查看目录]

[视频]王珊《数据库系统概论》(第5版)精讲班展开视频列表

说明:以上为本科目参考教材配套的辅导资料。

本科目参考教材(供参考)

谭浩强《C程序设计》

王珊《数据库系统概论》

谢希仁《计算机网络》

内容试看

第2章 算法——程序的灵魂

用伪代码表示第2题中各题的算法。

答:(1)A瓶与B瓶互换的伪代码为:

c=a

a=b

b=c

(2)求解10个数中最大数的伪代码为:

n=1

input max

while n

input a

if a>max then max=a

n=n+1

end do

print max

(3)将3个数大小输出的伪代码为:

input a,b,c

if a

if a

print c,a,b

else

if c>b then

print a,c,b

else

print a,b,c

end if

end if

(4)求1+2+3+…+100的伪代码为:

sum=0

n=1

while n

sum=sum+n

n=n+1

end do

print sum

(5)判断一个数n能否同时被3和5整除的伪代码为:

input n

flag=0

if mod(n,3)≠0 then flag=-1

if mod(n,5)≠0 then flag=-1

if flag=0 then

print n "能被3和5整除"

else

print n "不能被3和5整除"

end if

(6)输出100~200之间素数的伪代码为:

n=100

while n

i=2

while i

if mod(n,i)=0 then

i=n

else

i=i+1

end if

end do

if i

n=m+1

end do

(7)求两个数m和n最大公约数的伪代码为:

input m,n

if m

t=mod(m,n)

while r≠0 do

m=n

n=r

r=mod(m,n)

end do

print n

(8)求方程式ax2+bx+c=0根的伪代码为:

int a,b,c

disc=b^2-4ac

if disc>=0 then

if disc=0 then

x1,x2=-b/(2a)

else

x1=(-b+sqrt(disc))/(2a)

x2=(-b-sqrt(disc))/(2a)

end if

print x1,x2

else

p=-b/(2a)

q= sqrt(disc)/(2a)

print p+q,"+","i"

end if