欢迎来到天天文库
浏览记录
ID:19686188
大小:44.50 KB
页数:22页
时间:2018-10-05
《程序填空(1)(国外英语资料)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、程序填空(1)*--------------------------------------------------------------------------------------------------------------[programfillsinblank]-----------------------------------------------------------------------------------------------------------------
2、-Problem:enterNdataintoanarray,putitupsidedown,andprintouttheoutput.-------------------------------------------------------------------------------------------------------------*/#include#defineN10Voidmain(){intI,t,a[N];Printf("Enter%dNumbers:
3、",n);For(I=0;I4、--------------------------------[programfillsinblank]------------------------------------------------------------------------------------------------------------------Topic:determinewhetheragivenintegerisaprimenumber.-----------------------------------5、--------------------------------------------------------------------------*/#includeH#include"math."Voidmain(){intm,I,k;Scanf("%d",&m);K=SQRT(m);TotheSPACEofamanFor(I=2);TotheSPACEofamanIf(?)?TotheSPACEofamanIf([?])Printf("Yes");TheelsePrint6、f("No");}I<=km%I=0I>k/*--------------------------------------------------------------------------------------------------------------[programfillsinblank]------------------------------------------------------------------------------------------------7、------------------Topic:thefirst15itemsoftheFibonaccisequenceareprinted,requiringeachrowtooutput5items.FibonacciNumbers:1,1,2,3,5,8,13...-------------------------------------------------------------------------------------------------------------*/#inc8、ludeVoidmain(){TotheSPACEofamanInt[?][15],I;Fib[0]=1;Fib[1]=1;For(I=2;I<15;I++)TotheSPACEofamanFib[I]=[...];For(I=0;I<15;I++){Printf("%dt",fib[I]);TotheSPACEofamanIf(?))printf("");}}Fibfib[I-2]+fib[I-1]/*--------------------
4、--------------------------------[programfillsinblank]------------------------------------------------------------------------------------------------------------------Topic:determinewhetheragivenintegerisaprimenumber.-----------------------------------
5、--------------------------------------------------------------------------*/#includeH#include"math."Voidmain(){intm,I,k;Scanf("%d",&m);K=SQRT(m);TotheSPACEofamanFor(I=2);TotheSPACEofamanIf(?)?TotheSPACEofamanIf([?])Printf("Yes");TheelsePrint
6、f("No");}I<=km%I=0I>k/*--------------------------------------------------------------------------------------------------------------[programfillsinblank]------------------------------------------------------------------------------------------------
7、------------------Topic:thefirst15itemsoftheFibonaccisequenceareprinted,requiringeachrowtooutput5items.FibonacciNumbers:1,1,2,3,5,8,13...-------------------------------------------------------------------------------------------------------------*/#inc
8、ludeVoidmain(){TotheSPACEofamanInt[?][15],I;Fib[0]=1;Fib[1]=1;For(I=2;I<15;I++)TotheSPACEofamanFib[I]=[...];For(I=0;I<15;I++){Printf("%dt",fib[I]);TotheSPACEofamanIf(?))printf("");}}Fibfib[I-2]+fib[I-1]/*--------------------
此文档下载收益归作者所有