473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

There are three errors.how can i fix it?

#include<stdio.h>
int main()
{
int no1,no2,no3,max,min;
printf("Enter three numbers");
scanf("%d %d %d",&no1,&no2,&no3);
if (no1>no2) && (no1>no3)
max=no1;
else if (no2>no3)
min=no3;
else
min=no2;
if(no2>no1)&&(no2>no3)
max=no2;
else if (no1>no3)
min=no3;
else
min=no1;
if(no3>no1)&&(no3>no2)
max=no3;
else if(no1>no2)
min=no2;
else
min=no1;
printf("The largest number is %d \n",max);
printf("The smallest number is %d \n",min);


}
May 20 '18 #1
1 1061
weaknessforcats
9,208 Expert Mod 8TB
Your 3 "if" statements are missing the outer parentheses:

Expand|Select|Wrap|Line Numbers
  1. if (stuff)
  2. {}
May 20 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dennis Francis B. Tutanes | last post by:
$B$*@$OC$K$J$C$F$*$j$^$9!#(B $B%D%?%M%9(B@TSTI$B$G$9!#(B SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text...
5
by: Rene | last post by:
Suddenly in one database we have a lot of errors, it seams some things are corrupted. I tried to start maintanance / database repair, but this fails too. When selecting in Query Analyzer a range...
5
by: Urs Martini | last post by:
Hi! I experienced some problems using IE 6 and some kind of css like this: .... text above ... <div style="border: 1ps solid blue; float: left;">This is my 1st float</div> <div...
0
by: Chris McKenzie | last post by:
I'm getting this error when trying to drag a table from the Server Explorer to the XSD designer. I only get the problem at home--not at work. Any ideas on how to fix this? Thanks, Chris
2
by: AP | last post by:
Hi, After a compile, if there are errors, the task list window pops up automatically. This is annoying. I'm happy with the error list in the output window like VC++ 6. So is there an option or...
1
by: Dr. Zharkov | last post by:
Hello. A problem in the following. In VB .NET 2003 I create the project and in file Form1.vb is written down the following code: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As...
10
by: Szabolcs Horvát | last post by:
Consider the attached example program: an object of type 'A' is inserted into a 'map<int, Am;'. Why does 'm;' call the copy constructor of 'A' twice in addition to a constructor call? The...
0
by: mirandacascade | last post by:
Questions toward the bottom of the post. Situation is this: 1) Access 97 2) SQL Server 2000 3) The Access app: a) sets up pass-thru query b) .SQL property of querydef is a string, the...
3
by: deedee2 | last post by:
Hi there, Im having an issue starting out a problem. I am trying to take a list of poisonous snakes, and my python function needs to take this list of snakes and a given plane name with a list...
6
by: anderson1373 | last post by:
This is giving me a syntax error at the elif statement but i'm not sure why. please help me. miles = 0.0 kilometers = 0.0 def show_menu(): print("1. Convert miles into kilometers.")...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.