Asssignment and equality

if I equalize avg to the given sum instead of assigning it as done so why do I get the output as 0 instead of the required answer.

hey @Codarikh , can you share your code shared in coding blocks ide.

hey @Codarikh, you have read the value later and find the average eariler. When average was calculated,a=0, b=0,c=0 so output is coming 0. Exchange the 6 and 7.

sir, but in this code.
int a;
a==5;
cout<<a;

it also gives the output as 0.
Why?

hey @Codarikh, a==5, means you are checking whether value of a is equal to 5 or not. If you want to assigne value 5 to a, then you should write a=5 instead a==5.