Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hw 2 CSC 138 There has been a study made about people's personality and their so believed lucky number. The people who believe that their

Hw 2 CSC 138 There has been a study made about people's personality and their so believed "lucky number". The people who believe that their lucky number is prime are more introverts than the ones who chose non-prime numbers. Input names of people until is introduced, in the place of a name. For each person ask their lucky number. Based on the lucky number, assign true or false to the field introvert. If the number is prime introvert should be set to true otherwise to false. The output should list the names of all the people under one of the two categories: Introvert, or Extrovert. Use the following struct type struct infoPers{

string name

int luckyNum;

bool introvert; };

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions