Computer Science, asked by nivekitty4379, 9 months ago

Example solution to find average using friend class

Answers

Answered by Anonymous
1

Explanation:

  • ғʀɪᴇɴᴅ ᴄʟᴀss ᴀ ғʀɪᴇɴᴅ ᴄʟᴀss ᴄᴀɴ ᴀᴄᴄᴇss ᴘʀɪᴠᴀᴛᴇ ᴀɴᴅ ᴘʀᴏᴛᴇᴄᴛᴇᴅ ᴍᴇᴍʙᴇʀ ᴏғ ᴏᴛʜᴇʀ ᴄʟᴀss ɪɴ ᴡʜɪᴄʜ ɪᴛ ɪs ᴅᴇᴄʟᴀʀᴇᴅ ᴀs ғʀɪᴇɴᴅ.
Answered by HITEN330708
0

IMAGINE

IN SCHOOL , YOU HAVE 6 FRIENDS IN YOUR CLASS

AND , IN SOCIETY , YOU HAVE 12 FRIENDS

SO , TO FIND YOUR AVERAGE NO. OF FRIENDS INCLUDING ALL

12+6/2

=9

Similar questions