Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Flowcharts

Options
  • 17-11-2004 5: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