资源预览内容
第1页 / 共62页
第2页 / 共62页
第3页 / 共62页
第4页 / 共62页
第5页 / 共62页
第6页 / 共62页
第7页 / 共62页
第8页 / 共62页
第9页 / 共62页
第10页 / 共62页
亲,该文档总共62页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
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=calculationresults.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 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 respectively.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 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 not.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 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 fraction 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 time 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 format 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 program 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 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 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 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 class 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 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
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号