Find largest digit in c program

469 word (2 pages) essay in Data Analysis

5/12/16 Data Analysis Reference this

Disclaimer: This work has been submitted by a student. This is not an example of the work produced by our essay writing service.

You can view samples of our professional work here.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UK Essays.

mumbers (positive,nagative,integer,double numbers) from the keyboard and prints area,largest number,negcount,reverse,average.*/

//including header file


using namespace std;

// main declaration

void main()


//declaring variables

int num;

int sum1=0;

float sum2=0;

int negcount=0;

int i=0;

int largest;

int smallest;

float average=0.0;

int temp1=0;

int temp2=0;

float area=0.0;

int radius;

int large;

int small;

int temp3;

int b;

int temp4;

int temp;

int poscount=0;

float pi=3.14;

for(i=0; i<8; i++)


//Reading numbers from user

cout << "Enter integer number " << i+1 << ", followed by 'Enter': ", i;

cin >> num;









if( num > 0 )//Considering positive numbers







sum1= sum1+num;





// considering negative numbers







average = sum2/2;



// checking the largest number of given 8 numbers

if ( num < smallest )


smallest = num;


if ( num > largest )


largest = num;


//checking the smallest positive number



if ( num <= small )


Find largest digit in c program small = num;


if ( num >= large )


large = num;



area=pi*(radius*radius);//calculating the area of the circle


// reversing the first two numbers entred




//printing outputs for given inputs


cout << "Sum of positive numbers entered is " << sum1 << endl;

cout << "count of negative numbers entered is " << negcount << endl;

cout << "Largest number of all entered inputs is " << largest<

cout<<"reverse of first two numbers is"<

cout<< temp4<

cout<<"average of first two negative numbers given is"<

cout<<"area of circle using small positive number as radius"<


Cite This Work

To export a reference to this article please select a referencing stye below:

Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.

Related Content

Featured review logo

“Thank you UK Essays for your timely assistance. It has helped me to push forward with my thesis.”

Tajeram M

Related Services

View all

DMCA / Removal Request

If you are the original writer of this essay and no longer wish to have the essay published on the UK Essays website then please.

McAfee SECURE sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams Prices from

Undergraduate 2:2 • 1,000 words • 7 day delivery

Learn More Order now

Delivered on-time or your money back

Each order includes
  • A fully qualified writer in your subject
  • 100% confidentiality, the work is never re-sold or published
  • Standard 7-day amendment period
  • A paper written to the standard ordered
  • A detailed plagiarism report
  • A comprehensive quality report
Rated 4.5 out of 5 by Logo (61 Reviews)

Our Services

We have a range of academic services including essay writing, full and part dissertation writing, and our ever popular marking and proofreading service.

You can view our full service portfolio here

UK Essays can show you how to write great academic work with our 4.5 star rated services Logo
Place an order or Learn about our services