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

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ 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>
main()
{
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;

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

cout "Average Age of the class is:";
AverageAge=totalage/6;

}

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: 275

.

+ 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

thnx

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!
to
TotalAge = age1+age2+age3+age3+age4+age5+age6;

thnx

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 :)

RSS

Today Top Members 

1 Biya

Biya

2 Asad

Asad

3 Ahmad

Ahmad

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

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

.