473,378 Members | 1,493 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,378 software developers and data experts.

Can someone help me with this

1
I need this for school and can't make it work
__________________________________________________ ________________

#include<iostream.h>
int a,b,c;
int main()
{
cin>>a>>b>>c;
if((a+b)/2=c)
cout<<"corect";
else
if((a+c)/2=b)
cout<<"corect";
else
if((c+b)/2=a)
cout<<"corect";
else
cout<<"incorect";
return 0;
}

__________________________________________________ ________________
a.cpp: In function `int main()':
a.cpp:6: error: non-lvalue in assignment
a.cpp:9: error: non-lvalue in assignment
a.cpp:12: error: non-lvalue in assignment


Can somebody help me please
Jan 17 '10 #1
1 1487
Banfa
9,065 Expert Mod 8TB
In all your if statements you have =; assignment, instead of ==; comparison.
Jan 17 '10 #2

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

Similar topics

2
by: Sean | last post by:
I have two sites that i use for personal stuff (family, friends, photos). They are PHP sites butim not a programmer. They were setup by a friend who no longer helps with them. There are some...
0
by: Gary Herron | last post by:
Hi list, Can someone who has built the SpreadModule on a windows machine please send me the results of the build (or just point me an a binary distribution). Here's why: I'm starting to...
4
by: mike | last post by:
regards: excuse me,can someone introduce me some xhtml webs? i want to see the xhtml web http response. i know one xhtml web "http://www.w3c.org" could someone introduce me some xhtml...
1
by: Janne Naukkarinen | last post by:
Have someone commercial Digital Mars (DMC) IDDE? I need help making makefiles, it is easier with IDDE. However, IDDE is not freely distributed on net. There is current WinVN WIP:
9
by: TCMA | last post by:
I am looking for some tools to help me understand source code of a program written in C++ by someone else. Are there any non-commercial, open source C or C++ tools to reverse engineer C or C++...
5
by: Raziq Shekha | last post by:
Hello all, Is there a way to figure out when was the last time someone connected to a database? SQL 2000 environment. Thanks, Raziq.
3
by: MarcJessome | last post by:
Hi, I was wondering if someone could help me through learning C++. I've tried learning before, but I find I would work better if I had someone that could help explain a few things to me. Im using...
5
by: Miles Keaton | last post by:
I'm switching to PostgreSQL from MySQL. Using the SAMs book called PostgreSQL which has been great to skim the surface of the differerences. I had never even heard of things like triggers,...
7
by: Robert Blackwell | last post by:
Hey, I have a question for you web devs out there. How much of a hassle is it to take over where another programmer left off. I have a commerce site that was designed to my specs and I approached...
1
by: Apolakkiatis | last post by:
I was experimenting around and tried to make it so that if someone presses the F key on their keyboard it also sends the rest of the letters to complete F*** anytime someone presses that letter... I...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...

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.