Question

Part of college is balancing your studies with your social life. You cant study all the time, but if you dont study at all

Three Quick Comments on the Program 1. You can assume the user will always enter legal input. Every input entered will be a s

flowchart

What are you worried about? test project How big a test? what kind? quiz midterm huge normal extra-credit Pass the last quiz?

Help with c please

0 0
Add a comment Improve this question Transcribed image text
Answer #1

C program for following flowchart ===>

#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main()
{
char str[50];

printf("What are you worried about ? (test or project) : ");
scanf("%[^\n]%*c",str);
  
if(strcmp(str,"test")==0)
{
char str1[50];
printf("How big a test ? (quiz or midterm) : ");
scanf("%[^\n]%*c",str1);
if(strcmp(str1,"quiz")==0)
{
char str2[50];
printf("Pass the last quiz ? (yes or no) : ");
scanf("%[^\n]%*c",str2);
if(strcmp(str2,"no")==0)
{
printf("You Need to Study");
}
else if(strcmp(str2,"yes")==0)
{
char str3[50];
printf("Pass easily ? (yes or no) : ");
scanf("%[^\n]%*c",str3);
if(strcmp(str3,"no")==0)
{
printf("You Need to Study");
}
else if(strcmp(str3,"yes")==0)
{
printf("Do Something Fun");
}

}

}
else if(strcmp(str1,"midterm")==0)
{
char str4[50];
printf("A class in major ? (yes or no) : ");
scanf("%[^\n]%*c",str4);
if(strcmp(str4,"no")==0)
{
char str5[50];
printf("Easy class ? (yes or no) : ");
scanf("%[^\n]%*c",str5);
if(strcmp(str5,"no")==0)
{
printf("You Need to Study");
}
else if(strcmp(str5,"yes")==0)
{
printf("Do Something Fun");
}
}
else if(strcmp(str4,"yes")==0)
{
char str6[50];
printf("Required class ? (yes or no) : ");
scanf("%[^\n]%*c",str6);
if(strcmp(str6,"no")==0)
{
char str7[50];
printf("Doing well ? (yes or no) : ");
scanf("%[^\n]%*c",str7);
if(strcmp(str7,"no")==0)
{
printf("You Need to Study");
}
else if(strcmp(str7,"yes")==0)
{
printf("Do Something Fun");
}
}
else if(strcmp(str6,"yes")==0)
{
char str8[50];
printf("Taken it before? (yes or no) : ");
scanf("%[^\n]%*c",str8);
if(strcmp(str8,"no")==0)
{
char str9[50];
printf("Are you ready? (yes or no) : ");
scanf("%[^\n]%*c",str9);
if(strcmp(str9,"no")==0)
{
printf("You Need to Study");
}
else if(strcmp(str9,"yes")==0)
{
printf("Do Something Fun");
}
}
else if(strcmp(str8,"yes")==0)
{
printf("You Need to Study");
}

}
}
}
}
else if(strcmp(str,"project")==0)
{
char str10[50];
printf("What kind? (huge or normal or extra-credit) : ");
scanf("%[^\n]%*c",str10);
if(strcmp(str10,"extra-credit")==0)
{
char str11[50];
printf("Course grade ? (great or not-great ) : ");
scanf("%[^\n]%*c",str11);
if(strcmp(str11,"great")==0)
{
printf("Do Something Fun");
}
else if(strcmp(str11,"not-great")==0)
{
printf("You Need to Study");
}
}
else if(strcmp(str10,"normal")==0)
{
char str12[50];
printf("Can you drop one ? (yes or no ) : ");
scanf("%[^\n]%*c",str12);
if(strcmp(str12,"yes")==0)
{
char str13[50];
printf("Already dropped one ? (yes or no ) : ");
scanf("%[^\n]%*c",str13);
if(strcmp(str13,"yes")==0)
{
printf("You Need to Study");
}
else if(strcmp(str13,"no")==0)
{
printf("Do Something Fun");
}
}
else if(strcmp(str12,"no")==0)
{
printf("You Need to Study");
}
}
else if(strcmp(str10,"huge")==0)
{
char str14[50];
printf("Due soon ? (tomorrow or this-week or next-week ) : ");
scanf("%[^\n]%*c",str14);
if(strcmp(str14,"tomorrow")==0)
{
printf("You Need to Study");
}
else if(strcmp(str14,"next-week")==0)
{
char str15[50];
printf("Busy weekend ? (yes or no ) : ");
scanf("%[^\n]%*c",str14);
if(strcmp(str15,"yes")==0)
{
printf("You Need to Study");
}
else if(strcmp(str15,"no")==0)
{
printf("Do Something Fun");
}
}
else if(strcmp(str14,"this-week")==0)
{
char str16[50];
printf("Almost finished ? (yes or no ) : ");
scanf("%[^\n]%*c",str16);
if(strcmp(str16,"yes")==0)
{
printf("Do Something Fun");
}
else if(strcmp(str16,"no")==0)
{
char str17[50];
printf("Have you started ? (yes or no ) : ");
scanf("%[^\n]%*c",str17);
if(strcmp(str17,"yes")==0)
{
printf("Do Something Fun");
}
else if(strcmp(str17,"no")==0)
{
printf("You Need to Study");
}
}
}
}
}
return 0;
}

OUTPUT SCREENSHOT ====>

C:\Users\CG-DTE\Documents\c++\testproject\bin\Debug\testproject.exe What are you worried about ? (test or project) : test How

Add a comment
Know the answer?
Add Answer to:
flowchart Help with c please Part of college is balancing your studies with your social life....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In C++, Please help me compute the following flowchart exactly like this requirement: Use while loops...

    In C++, Please help me compute the following flowchart exactly like this requirement: Use while loops for the input validations required: number of employees(cannot be less than 1) and number of days any employee missed(cannot be a negative number, 0 is valid.) Each function needs a separate flowchart. The function charts are not connected to main with flowlines. main will have the usual start and end symbols. The other three functions should indicate the parameters, if any, in start; and...

  • C program flow char Make flow-charts to do the following. Each flowchart element can only pertora...

    C program flow char Make flow-charts to do the following. Each flowchart element can only pertora one fundamental operation (such as add, compare, input, etc) at each step. Write/print your answers on paper that is stapled together with your CS256 user-nane at the top of each page. 1) (1pt) Input two numbers (N, N), compare then and output the larger of the tvo. 2) (1pt) Get a number (N) as input and output that number squared and cubed. 3) (2pts)...

  • use  JOptionPane to display output Can someone please help write a program in Java using loops, not...

    use  JOptionPane to display output Can someone please help write a program in Java using loops, not HashMap Test 1 Grades After the class complete the first exam, I saved all of the grades in a text file called test1.txt. Your job is to do some analysis on the grades for me. Input: There will not be any input for this program. This is called a batch program because there will be no user interaction other than to run the program....

  • Please help with this Intro to programming in C assignment! Intro to Programming in C-Large Program...

    Please help with this Intro to programming in C assignment! Intro to Programming in C-Large Program 3 - Hangman Game Assignment purpose: User defined functions, character arrays, c style string member functions Write an interactive program that will allow a user to play the game of Hangman. You will need to: e You will use four character arrays: o one for the word to be guessed (solution) o one for the word in progress (starword) o one for all of...

  • Please help: For this project, you will create a shape drawing program using Turtle graphics. Your...

    Please help: For this project, you will create a shape drawing program using Turtle graphics. Your program will begin by asking the user how many points they would like to enter (# of vertices for the shape). Next, you will use a loop to input each X and Y coordinate and store these coordinates in lists. After inputting all of the coordinates, create a second loop that will draw and fill the shape using the coordinates that were entered. All...

  • I need help writing this program in C. (not C++) Armor Games CrazyMonkeyGames Max Games Palomar...

    I need help writing this program in C. (not C++) Armor Games CrazyMonkeyGames Max Games Palomar College堯Wolfram|Alpha M Gmail EaXGen Studios How About a Date? Dinner and Dancing with your Computer The purpose of this assignment is to acquaint you with the capability of a computer program to systematically explore a set of possibilities and deter mine the validity of input to the program. HPal-CSC112Spring 2017/ Lab Solutions 12-How about a datelcheckDatelnC Debuglche... elcome to my Date Checker Project Enter...

  • Java programming for ticket price calculator.  It should ask the user if they would like to process...

    Java programming for ticket price calculator.  It should ask the user if they would like to process another ticket order. They should indicate their selection with a Y or N. If they indicate yes, then it should repeat the entire program with the exception of the welcome screen. If they indicate no, it should show the final thank you message and end the program. If they indicate an invalid answer, it should display an error and re-prompt them for a Y...

  • C# Write a program that takes a list of information and grades of the students of...

    C# Write a program that takes a list of information and grades of the students of a class and perform some processing. Take the following steps to write the program. The program must give the user two options such as a menu. At the beginning of the program must ask the following from the user: Which task you want to do (choose an option between 1-2), 1- Entering new information 2- Searching a student If the user types something rather...

  • i need this in C# please can any one help me out and write the full...

    i need this in C# please can any one help me out and write the full code start from using system till end i am confused and C# is getting me hard.I saw codes from old posts in Chegg but i need the ful complete code please thanks. Module 4 Programming Assignment – OO Design and implementation (50 points) Our Battleship game needs to store a set of ships. Create a new class called Ships. Ships should have the following...

  • Hi, this is an intro to C Programming Class. Please do not use arrays, functions, math.h,...

    Hi, this is an intro to C Programming Class. Please do not use arrays, functions, math.h, or struct to store any data except to declare strings char strVar[20]. Furthermore, can you please do a good check to make sure the final program does not have any problems because when I copy and paste them the app I use says there are some problems and it won't run the program. So if you can double check to make sure that everything...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT