Solved

C program & flowchart

Posted on 2003-10-26
10
349 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: 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

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!

Question has a verified solution.

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

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
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 pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

615 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