Wtf | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Wtf

why does this program return 0 for sum and avg. #include <iostream> using namespace std; int main() { int a=0,b=0,c=0,avg=0; int sum=0; avg=a+b+c; sum=a+b+c; cout<< "Game Score Averaging Program\n\n"; cout<<"Please enter your first score: "; cin >> a; cout<<"Please enter your second score: "; cin >> b; cout<< "Please enter your third score: "; cin>> c; cout<< "The sum of your scores is: " << sum<< endl; cout<< "The average of your scores is: " << sum/

2nd Jun 2017, 9:46 PM
Bryan
1 Answer
+ 1
that makes sense. thank you. I am very new to this 1 week only
2nd Jun 2017, 10:06 PM
Bryan