Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:44:19+00:00 2026-06-04T12:44:19+00:00

I have two variable for graph one is value and other is value1 i

  • 0

I have two variable for graph one is value and other is value1 i want that int max should get the value of those variable which has maximum values like if value=50 and value1=100 then max=value1

    appDelegate=[[UIApplication sharedApplication]delegate];

     int value3=[appDelegate.oneGlobal intValue];
    int value4=[appDelegate.twoGlobal intValue];
    int value5=[appDelegate.threeGlobal intValue];


        int max;

        if (value3>value4) {
            max=value3;

        }  
        else if(value3>value5){

            max=value3;


          }
        else if(value4>value3){
            max=value4;

        }
        else if(value4>value5){

            max=value4;

        }
        else{
            max=value5;

        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:44:21+00:00Added an answer on June 4, 2026 at 12:44 pm

    Delete all your if-statements and add the following to your code:

    max = (value3 > value4) ? value3: value4;
    max = (max > value5) ? max: value5;
    

    That would do the trick.

    Hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two threads: 'main' and 'worker', and one global variable bool isQuitRequested that
I have two javascript files in one folder.I want to pass a variable one
I have two C files. I want to declare a variable in one, then
Suppose I have two classes that both contain a static variable, XmlTag. The second
I have two pages, A and B. I want to echo a variable written
I have two variables, key and value , and I want to add them
I have two data frames, Data1 and Data2, that I want to merge based
If I have two threads and one global variable (one thread constantly loops to
Given the XML below.. and given that I have two variable 'Idnt' and 'Xref'
I am newbie in LINQ to XML.I have two variable one and two and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.