c语言期末必考40题(Clanguagestudy40finalquestions)

上传人:缘*** 文档编号:333288774 上传时间:2022-09-01 格式:PDF 页数:62 大小:4.17MB
返回 下载 相关 举报
c语言期末必考40题(Clanguagestudy40finalquestions)_第1页
第1页 / 共62页
c语言期末必考40题(Clanguagestudy40finalquestions)_第2页
第2页 / 共62页
c语言期末必考40题(Clanguagestudy40finalquestions)_第3页
第3页 / 共62页
c语言期末必考40题(Clanguagestudy40finalquestions)_第4页
第4页 / 共62页
c语言期末必考40题(Clanguagestudy40finalquestions)_第5页
第5页 / 共62页
点击查看更多>>
资源描述

《c语言期末必考40题(Clanguagestudy40finalquestions)》由会员分享,可在线阅读,更多相关《c语言期末必考40题(Clanguagestudy40finalquestions)(62页珍藏版)》请在金锄头文库上搜索。

1、c 语言期末必考 40 题(C l a n g ua g e s t ud y 40 f i n a l que s t i o n s)1.,according to the following format,from the keyboard inputan integer addition expression:operand 1+,operand 2,and thencalculate and output the expression of the calculation results,the form is as follows:operand 1+,operand 2=calc

2、ulationresults.2.enter two plastic numbers and print,if the user accidentallyentered the illegal characters,then the program prompts/zinputdata type error.3.,the three sides of the known triangle a,B,C,required towrite procedures,from the keyboard input a,B,C value,calculate and output the triangle

3、area(note the absence of thesituation).4.programming from the keyboard input radius of the circle R,calculate and output the circumference and area of the circle.5.any keyboard input from a three bit integer,the correctseparation of its bits,ten bits and hundreds of digits,andoutput on the screen re

4、spectively.6.,write a function to achieve statistics of an input numberof plastic number.7.programming equations ax*x+bx+c=0 root,a,B,C by keyboardinput,but only with the main function to achieve.8.write three functions,respectively,in b*b-4*a*c greaterthan 0,less than 0,equal to 0 when the call,and

5、 output results,in the main function to read the A,B,C values.9.from the keyboard input you and your friends age,todetermine who is older,and print the maximum age.10.enter a year from the keyboard,determine whether the yearis a leap year,and output results.11.determine whether someone is obese or n

6、ot.According to theheight and weight factors,medical workers after extensiveinvestigation and analysis are given according to the following“index for obese degree:body index t=w/h*h(W weight,unitkg,H height,unit is m).When t18 is low weight;when the tbetween 18 and 25,for normal weight;when the T is

7、 between 25and 27,for the excess weight;when t=27,obesity.Programmingfrom the keyboard input your height,h and weight W,accordingto the upper type to determine weight type.12.use the switch statement to percentile score into the score.13.using the switch statement will score into thecorresponding fr

8、action range and output.14.programming a simple calculator program,according to therequirements of the expression of the user from the keyboardinput:1 operand operator OP operand 2 to calculate the valueof the expression specified by the operator for the add,subtract,multiply and divide.15.use the t

9、ime function to write a guessing program.16.programming to calculate the factorial of n.17.the use of function recursive calculation n!.18.using PI /4=l-l/3+l/5-l/7.The value of the PI iscalculated until the absolute value of the last item is lessthan 0.0001.19.programming output positive triangle f

10、ormat of the 99multiplication table.20.programming output under the triangular format of the 99multiplication table.21.from the keyboard arbitrarily enter a positive integer,programming to determine whether it is a prime number,if theprime number,the output YES”,otherwise the output NO!.22.write a p

11、rogram to achieve the output of 1-100 betweenall primes.23.write a program to achieve the output of any designated m,n between all primes.24.read into a year and month,print out how many days of themonth(consider leap year),and use switch statementprogramming.25.print all the daffodils.The so-called

12、 narcissus number isa three digit number,the number of cubic and equal to the numberitself,(case 159=1*1*1+3*3*3+5*5*5)26.chicken with rabbit cage,there are 98 heads and 386 legs,each only how much programming for chicken.27.,with 1 yuan,5 cents,5 yuan coins,2 points and 1 centscoins(each kind must

13、have),a total of one hundred,ask a totalof several exchange programs?And output each scenario.28.Tri Color ball problem.If there are 12 balls in one pocket,3 red,3 white,6 black,and 8 balls from each other,how manydifferent colors match?29.print the square root table of integers within 100.30.print

14、the design:31.design a function to calculate the minimum common multipleof two positive integers.Thirty-twoThe design of a function,two positive integer GCD computation.33.programming makes the two-dimensional array enterthe following example:input 123,output 14456253634.from the keyboard input clas

15、s of a students class results(each class of the maximum number of not more than 40 people,the specific number of keyboard input),try to print the highestmarks and their student serial number.35.from the keyboard input five numbers,the use of bubblesorting,output sorting results.36.from the keyboard

16、input five numbers,using the sortingmethod,sorting output results.37.,from the keyboard input five students at any time the name,programming to find and output in the order of the dictionaryin the front of the student name.38.,from the keyboard input five students at any time the name,programming to find and output in the order of the dictionaryfive student names.39.programming from the keyboard arbitrary input 5 positiveintegers,statistics non negative number,and calculate the sumof non negativ

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 营销创新

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号