Solved

C program & flowchart

Posted on 2003-10-26
10
343 Views
Last Modified: 2010-04-15
I am very  new to C programming and I'm working with an ancient brain So if anyone can help
Program Example
/*  Case Program */
#include <stdio.h>
main(void)
{
char menu;
printf("input menu letter? \n");
scanf(" %c", &menu);
menu = toupper(menu);
/* case */
switch (menu)
{
case 'A': printf("You have selected A \n");
break;
case 'B': printf("You have selected B \n");
break;
case 'C': printf("You have selected C \n");
break;
default: Printf("Invalid selection \n");
}

/* end case */
return 0;
}
I'm supposed to contrust a flow chart from this an so far I have Start
Output
Message

Input
Data

Output
Information

Case
Output
Information 1
Output
Information2
output
Information 3
Stopany suggestions for improvement
0
Comment
Question by:Serena2345
10 Comments
 
LVL 9

Expert Comment

by:tinchos
ID: 9624187
Sorry

I didn't understand what you are trying to do.
Can you explain a little more?
0
 

Author Comment

by:Serena2345
ID: 9624784
I am trying to make the program flowchart fit the program.
0
 
LVL 5

Accepted Solution

by:
snehanshu earned 50 total points
ID: 9626323
Serena2345,
Not sure what exactly you want, but perhaps you could add "process data" for the statement menu = toupper(menu);

Here's my attempt to make a text-o-graph :)
(Note: It looks better if pasted in notepad!)


                      _____
                     (START)
                      -----
                        |
            _____________________________
           /      Output Message        /
          /____________________________/      
                        |
            _____________________________
           /    Input Data             /
          /____________________________/      
                        |
           ______________________________
           |      Process Data          |
           |____________________________|      
                        |
                        |
                        |
                       / \
               = C    /   \        = A
              _______/case \______________________________
              |      \Data /                             |
              |       \   /                              |
              |        \ /    = B                        |
              |         |_________                       |
              |                  |                       |
              |                  |                       |
              |                  |                       |
              |                  |                       |
              |                  |                       |
              |                  |                       |
              |                  |                       |
              |                  |                       |
  ________________      ________________    ________________
 / Output Message/     / Output Message/   / Output Message/
/_______________/     /_______________/   /_______________/
              |                |                         |
              |________________|                         |
              |                                          |
              |__________________________________________|
              |
              |
              |
       _______________
      (    STOP       )
       ---------------

Hope that helps.
Cheers!
...Shu
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 5

Expert Comment

by:snehanshu
ID: 9823450
Hi!
  Haven't heard from Sarena since I posted. Don't know whether it actually helped.
Cheers!
...Shu
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9886697
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:
PAQed with A grade to snehanshu

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Sunny
EE Cleanup Volunteer
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 9886865
Thank you sunny for the recommendation! I shall steal your cleanup post format for my posts in the Delphi TA. Hope you don't mind.
:-)
...Snehanshu
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9886872
Be my guest and welcome to the club .. return to help C programming TA with cleanup someday :o)
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 9887087
Thank you Sunny.
>>return to help C programming TA with cleanup someday
I'll try to :-)
...Shu
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Binary Bomb: Phase 4 func4 3 332
Passing command line arguments in C 10 92
Raspberry Pi 3 to send text message 9 115
Please explain C language error codes ? 5 11
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question