Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Flowcharts

  • 17-11-2004 05:46PM
    #1
    Closed Accounts Posts: 272 ✭✭


    I have to draw a flowchart for college, I have the C program written already. I know the exact lay out of the flowchart but I just can't figure out what exactly I write in the rectangles and diamonds. I'll post up the start of the code and maybe someone could help me out:
    do
        {
        		printf("Select a country from the list below:\n");
        		printf("1. Britain\n2. Denmark\n3. Japan\n4. USA\n5. Exit Program\n\n");
    
        		scanf("%d", &ctry);
    
             switch (ctry)
             {
             		case 1:
                   {
                   		printf("\nTo convert from Euro to Pounds press 1\n");
            					printf("To convert from Pounds to Euro press 2\n\n");
            					scanf("%d", &choice);
    
                        	if (choice == 1)
            					{
                         		printf("\nPlease enter the amount to be converted: ");
            							scanf("%f", &amount);
    
                					pound = 0.7 * amount;
                					printf("\n%1.2f Euro is equal to %1.2f Pounds\n\n", amount, pound);        
            					}
    
    
                         else if (choice == 2)            
            					{
                         		printf("\nPlease enter the amount to be converted: ");
            							scanf("%f", &amount);
    
                					euro = 1.42 * amount;
                					printf("\n%1.2f Pounds is equal to %1.2f Euro\n\n", amount, euro);
            					}
    
                         else
                         {
                         		printf("\nInvalid selection, try again\n\n");
                         }
    
                 	      break;
                   }
    .....
    
           while ( ctry !=5 );
    }
    

    I have attached the flowchart to show that I know the lay out (even though its a bit of a mess :) ). All I basically need to know is what to write in the boxes.

    Thanks.


Comments

  • Closed Accounts Posts: 272 ✭✭irish life


    I have to have this in tomorrow so absolutely any replies are greatly appreciated.


  • Closed Accounts Posts: 9,390 ✭✭✭Stench Blossoms


    Look at richard lawlors website... he put up notes on flowcharts


Advertisement