# Thread: I want to plus largest number and smallest number

1. ## I want to plus largest number and smallest number

Hello ı want to plus it largest and lowest number this software.

I want to software like this;
1.Enter number like 25
2.Enter number like 40
3.Enter number like 5

40+5=45

ı want to plus it 40 + 5
I'm finding largest and lowest number but i cant plus it.
I need help thanks.

Code:
```#include <stdio.h>#include <conio.h>
#include <stdlib.h>

main()
{
int a, b, c, plus;
printf("1. Enter Number: "); scanf("%d", &a);
printf("2. Enter Number: "); scanf("%d", &b);
printf("3. Enter Number: "); scanf("%d", &c);
if ((a>b) && (a>c)) printf("largest number: %d", a);
else if (b>c) printf("largest number: %d", b);
else printf("largest number: %d", c);

if ((a<b) && (a<c)) printf("\nlowest number: %d", a);
else if (b<c) printf("\nlowest number: %d", b);
else printf("\nlowest number: %d", c);
getch();

}``` 2. Hello ı want to plus it largest and lowest number this software.

I want to software like this;
1.Enter number like 25
2.Enter number like 40
3.Enter number like 5

40+5=45

ı want to plus it 40 + 5
I'm finding largest and lowest number but i cant plus it.
I need help thanks.

Well, you've done it yourself already... All you need to do is add your Largest and Lowest numbers and store it in a variable, say Sum, and print it. 'if' statements can contain more than one line of code if you write something like so

Code:
```if ( /* Test Condition */ )
{
// Code
}``` Code:
```

plus = a + c;
printf("\n a+c = %d\n", plus);
return 0;```
and software plus true if software like this:
1
2
3

3+1 =4 it's true but if

numbers like this:
5
4
9

true plus: 9+4=13
but software plus it: 9+5 software wasn't plus it lowest and highest number software always plus 1. and 3. number 4. It is not enough to just print the numbers that are the largest and smallest. The computer is not going to remember which variable it is, so you need to also assign the largest number to a, and the smallest number to c, if you want plus = a + c to always work. 5. I was fixed problem thank you all guys. Popular pages Recent additions #include, enter, number, printflargest, scanf%d 