Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C program & flowchart

Posted on 2003-10-26
10
Medium Priority
?
351 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
8 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 200 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Suggested Courses

877 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