Write a program that administers a short, if unscientific, personality test, sco
ID: 3671497 • Letter: W
Question
Write a program that administers a short, if unscientific, personality test, scores the test, and determines whether or not the user's personality is Type A, Type B. or somewhere in between. The program should prompt the user to answer each of the eight questions with a number between the range of 1-5 where 1 means Never and 5 means always. The eight questions are: I am competitive I am annoyed by people who arc late for appointments I perform several tasks simultaneously I am ambitious I rush to get tasks completed I worry about the future l am in a race with time I speak very rapidly If the score is in the range of 35-40 Type A, 21-34 Between A and B, tending towards A, 12-20 Between A and B, tending towards B, 8-11 Type B. You should find someone to take your test and print out their score. The person that took your test must sign the paper and the paper will be turned in at the beginning of class.Explanation / Answer
#include <iostream>
using namespace std;
void main()
{
clrscr();
int a,b,c,d,e,f,g,h;
int sum;
cout<<"Please range your self between 1-5 for each :";
cout<<"I am competitive :";
cin >> a;
cout<<"I am annoyed by people who are late for appointments :";
cin >> b;
cout<<"I perform several Tasks simultaneously :";
cin >> c;
cout<<"I am ambitious :";
cin >> d;
cout<<"I rush to get tasks completed :";
cin >> e;
cout<<"I worry About the future :";
cin >> f;
cout<<"I am in race with time :";
cin >> g;
cout<<"I speak very rapidly :";
cin >> f;
sum = (a+b+c+d+e+f+g+h);
if(sum>=40 && sum<=35)
{
cout<<"TYPE A";
}
else if(sum>=21 && sum<=34)
{
cout<<"You are BETWEEN A and B , and tending towrds A:";
}
else if(sum>=12 && sum <=20)
{
cout<<"You are BETWEEN A and B , and tending towrds B:";
}
else
cout<<"Type B";
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.