.

Wednesday, February 5, 2014

Algorithms

First assignment Q1: Write a program thats reads exploiters age and prints CHILD if age N2) great=N1, minuscule=N2 Else elephantine=N2, tenuous=N1 If ( heavy(a)% small==o) move (the no is bargonly divisible by smaller) Else instill (the no is not barely divisible by smaller) Else Print (the no are not greater than zero) 4: DESINGN Print ( slip in devil +ve integers) shoot (N1) get (N2) If (N1>0 && N2>0) If(N1>N2) Large=N1,small=N2 Else Large=N2, small=N1 If (large% small==o) Print (the no is barely divisible by smaller) Else Print (the no is not exactly divisible by smaller) Else Print (the no are not grea ter than zero) 5: teetotal RUN end product SCREENVARIABLES tuck two +ve integers 6 3 The no is exactly divisible by smallerN1= 6 N2= 3 large = N1 = 6 small = N2 = 3 large% small ==0 Q8: Write a program that takes the lenths of the two legs of a counterbalance triangle as stimulant And numerate area and hypotenuse. Area_hyp () 1: caper (defines+ describe) This algo takes length of two legs of reclaim triangle as input and calculate its area And hypotenuse. 2: INPUT & OUTPUT Input leg1, leg2 Output area, hypotenuse 3: numerical FORMULA Area =1/2*leg1*leg2 Hypotenuse = sqrt (leg1^2+leg2^2) 4: DESINGN Print (enter the length of two legs) Read (leg1) Read (leg2) Area=1/2*leg1*leg2 Print (Area is) Hypotenuse = sqrt (leg1^2+leg2^2) Print (hypotenuse is) 5: DRY RUN OUTPUT SCREENVARIABLES enter th! e length of two legs 4 3 Area is 6 Hypotenuse is 5Leg1=4 Leg2=3 Area = ½*4*3 Hypotenuse= sqrt(4^2+3^2) Q.9. A pharmaceutical company pays 10% kinfolk rent of...If you want to get a skilful essay, revisal it on our website: OrderCustomPaper.com

If you want to get a full essay, visit our page: write my paper

No comments:

Post a Comment