We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

#include <iostream.h>
int age1,age2,age3,age4,age5,age6;
int TotalAge;
int AverageAge;
cout "Enter the age 1:";
cin >> age1;

cout "Enter the age 2:";
cin >> age2;

cout "Enter the age 3:";
cin >> age3;

cout "Enter the age 4:";
cin >> age4;

cout "Enter the age 5:";
cin >> age5;

cout "Enter the age 6:";
cin >> age6;


cout "Average Age of the class is:";


Compiler error says that total age not declared.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

See Your Saved Posts Timeline

Views: 316


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

You right totalage in last line. See above you declare TotalAge


try initializing variable TotalAge & AverageAge like

int TotalAge = 0;

int AverageAge =0;

//Also include <\< after every cout statement and correct line

TotalAge = age1+age2+age3+age3+age4+age5+age6!
TotalAge = age1+age2+age3+age3+age4+age5+age6;


Sorry write

C++ is case senstive language totalage NOT EQUAL TO TotalAge, you declared variable TotalAge and using as totalage which is error

thanks for help :)


© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service