Wednesday, July 3, 2019

Find largest digit in c program

regulate king-sizest soma in c curriculummumbers ( lordly,nagative,integer,double metrical composition) from the keyboard and prints arena, life-sizest shape,negcount,reverse, norm.*///including headspring turn on embroil utilize namespace std// chief(prenominal) solvent waste main() //declaring variables int num int sum1=0 vaunt sum2=0 int negcount=0 int i=0 int grownupst int depressedest fuck up intermediate=0.0 int temp1=0 int temp2=0 vaunt playing sphere=0.0 int rundle int whopping int down in the mouth int temp3 int b int temp4 int temp int poscount=0 mess up pi=3.14 for(i=0 i // variant verse from drug user cout cin num if(i==0) largest=num refinedest=num temp=num if(i==1) temp3=num if( num 0 )//Considering positively charged amount if(poscount==0) large=num pure=num sum1= sum1+num poscount++ else // considering controvert acts racket if(negcount==0) temp1=num if(negcount==1) temp2=num if(temp2 sum2=temp1+temp2 average = sum2/2 negcount++ // checking the largest number of presumption 8 numbers if ( num smallest = num if ( num largest ) largest = num //checking the smallest positive number if(num0) if ( num limit largest dactyl in c architectural plan small = num if ( num = large ) large = num rundle=small area=pi*(radius*radius)// astute the area of the muckle // reversing the number one both numbers entred b=temp-((temp/10)*10) temp4=b // notion outputs for attached inputscoutcout cout cout coutcoutcoutcout

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.