# can you give me the codes of finding the maximum and minimum integer f

Page 1 of 1

## 5 Replies - 2295 Views - Last Post: 21 August 2008 - 12:17 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=61274&amp;s=5c774994f4524afc65b3a81031d2c8a9&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 janozzy

Reputation: 0
• Posts: 3
• Joined: 20-August 08

# can you give me the codes of finding the maximum and minimum integer f

Posted 20 August 2008 - 11:30 PM

PLSS>....ANYONE CAN GIVE THE CODE OF THIS PROBLEM

finding the maximum and minimum integer from 10 iputs!!
Is This A Good Question/Topic? 0

## Replies To: can you give me the codes of finding the maximum and minimum integer f

### #2 no2pencil

• Professor Snuggly Pants

Reputation: 6642
• Posts: 30,930
• Joined: 10-May 07

## Re: can you give me the codes of finding the maximum and minimum integer f

Posted 20 August 2008 - 11:31 PM

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Thank you for helping us helping you.

### #3 janozzy

Reputation: 0
• Posts: 3
• Joined: 20-August 08

## Re: can you give me the codes of finding the maximum and minimum integer f

Posted 20 August 2008 - 11:46 PM

ohhh...im so sorry... ok
this is my idea... there is always an error,and i can't fid the right codes in these problem!!

```#include <stdio.h>
#include <conio.h>

int main()
{
int counter, num1= 0, num2= 0, num3= 0,num4= 0, num5= 0, num6= 0, num7= 0, num8= 0, num9= 0, num10= 0, max, min;

printf("\n\n\n\n\t\t\t\t Sequence.c\n\n\n");
printf("\t* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ");

printf("\n\n\n\t\t\t\t Enter num1: ");
scanf("%d", &num1);

printf("\n\n\t\t\t\t Enter num2: ");
scanf("%d", &num2);

printf("\n\n\t\t\t\t Enter num3: ");
scanf("%d", &num3);

printf("\n\n\t\t\t\t Enter num4: ");
scanf("%d", &num4);

printf("\n\n\t\t\t\t Enter num5: ");
scanf("%d", &num5);

printf("\n\n\t\t\t\t Enter num6: ");
scanf("%d", &num6);

printf("\n\n\t\t\t\t Enter num7: ");
scanf("%d", &num7);

printf("\n\n\t\t\t\t Enter num8:");
scanf("%d", &num8);

printf("\n\n\t\t\t\t Enter num9: ");
scanf("%d", &num9);

printf("\n\n\t\t\t\t Enter num10: ");
scanf("%d", &num10);

if((num1 < 2) && (num10>1))
{
printf("%d is he min", min);
}
else
{
printf("%d is the max", max);

}

getche();
return 0;

}

```

thnx by the way...!!

### #4 no2pencil

• Professor Snuggly Pants

Reputation: 6642
• Posts: 30,930
• Joined: 10-May 07

## Re: can you give me the codes of finding the maximum and minimum integer f

Posted 20 August 2008 - 11:51 PM

janozzy, on 21 Aug, 2008 - 02:46 AM, said:

and i can't fid the right codes in these problem!!

Are you kidding me? This has got to be one of the most popular projects for C/C++.

Did you search Dream In Code for it? It's been done to death!

Also, rather than making a variable for each & every entry, why don't you use an array?

### #5 janozzy

Reputation: 0
• Posts: 3
• Joined: 20-August 08

## Re: can you give me the codes of finding the maximum and minimum integer f

Posted 21 August 2008 - 12:11 AM

what is an array??? i don't know that..
im just a beginner my teacher assign me this project, and i don't know how to make it so i just combine the codes that i learned but its not working...!!!
can you help me??? ive been trying this for almost i week now...!!

### #6 no2pencil

• Professor Snuggly Pants

Reputation: 6642
• Posts: 30,930
• Joined: 10-May 07

## Re: can you give me the codes of finding the maximum and minimum integer f

Posted 21 August 2008 - 12:17 AM

As provided in the previous post : http://www.dreaminco...0...&sa=Go#1156