Solved

C program & flowchart

Posted on 2003-10-26
10
344 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Converting a float to a string function in c languange 10 208
Problem with MFCApp 78 418
C++ check and remove last word from a string 5 210
Line meaning 9 87
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops 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.

790 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