PASCAL CODE FIX
 Posted by mark123 Last Updated: March 17, 2012   2753

//Develop an algorithm or write pseudocode that accepts as input the names
//of an unspecified number of masqueraders who each have paid the full cost
//of their costume and the amount each has paid.

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int main()
{
char fullname[40];
int amount;
char choice;
char section2[20]={"White Panthers"};
char section4[20]={"The Tailors"};
char section5[20]={"Night Riders"};    
int total1,total2,total3,total4,total5,totalam1;
int totalam2,totalam3,totalam4,totalam5;
total1=0,total2=0,total3=0,total4=0,total5=0;
totalam1=0,totalam2=0,totalam3=0,totalam4=0,totalam5=0;

fflush(stdin);
{
scanf("%s",&fullname);
printf("Do you have a balance on your account?\n");
fflush(stdin);
scanf("%c",&choice);
if(choice=='y'||choice=='Y')
{
printf("You must pay the full cost before being accepted\n");
}
else
if(choice=='n'||choice=='N')
{
printf("You may continue the registration process\n");
printf("Please enter the amount you have paid:\n");
scanf("%d",&amount);
if(amount==180)
{
printf("The name %s is assigned to",fullname);
printf(" Section 1: %s",section1);
total1+=1;
totalam1=totalam1+amount;
}
else if(amount==240)
{
printf("The name %s is assigned to",fullname);
total2+=1;
totalam2=totalam2+amount;
}
else if(amount==300)
{
printf("The name %s is assigned to",fullname);
total3+=1;
totalam3=totalam3+amount;
}
else if(amount==370)
{
printf("The name %s is assigned to",fullname);
total4+=1;
totalam4=totalam4+amount;
}
else if(amount==445)
{
printf("The name %s is assigned to",fullname);
total5+=1;
totalam5=totalam5+amount;
}
else
{
printf("You must enter \$180,\$240,\$300,\$370,\$445");
}
}
printf("Any more entries?");
fflush(stdin);
{
printf("Entry process completed\n");
}
}
printf("Name of Person: %s",fullname);
printf("Section 1: %s Total persons: %d  Total paid :%d",section1,total1,totalam1);
printf("Section 2: %s Total persons: %d  Total Paid: %d",section2,total2,totalam2);
printf("Section 3: %s  Total persons: %d  Total Paid: %d",section3,total3,totalam3);
printf("Section 4: %s  Total persons: %d  Total paid: %d",section4,total4,totalam4);
printf("Section 5: %s Total Persons: %d  Total paid: %d",section5,total5,totalam5);

getch();
}

 suppose to be in pascal but not so familiar with it. anybody who can do pascal just convert this and post please.
 I think this will help....Download Dev Pascal to compile the code.... you can change the value of the variables according to ur application requirements.. I will e-mail the rest of documents. Program Carnival; Var Countsection1,Countsection2,Countsection3,Countsection4,Countsection5:integer; Totalsection1: real; Totalsection2: real; Totalsection3: real; Totalsection4: real; Totalsection5: real; Name: String [15]; Payment: real; Begin Countsection1:= 0; Countsection2:= 0; Countsection3:= 0; Countsection4:= 0; Countsection5:= 0; Totalsection1:= 0; Totalsection2:= 0; Totalsection3:= 0; Totalsection4:= 0; Totalsection5:= 0; Write ('Enter Name of Masqueraders'); Readln (Name); While length (Name) <> 0 do Begin Writeln ('Enter Payment Amount'); Readln (Payment); If (Payment=294) or (Payment=194)  Then Begin Countsection1:= Countsection1 + 1; Totalsection1:= Totalsection1+ Payment; Writeln (Name,' Is in section 1'); End Else If (Payment= 348) or (payment=246) Then Begin Countsection2:= Countsection2 + 1; Totalsection2:= Totalsection2 + Payment; Writeln (Name, 'is in section2'); End  else  If (Payment= 402) or (payment=302) Then Begin Countsection3:= Countsection3 + 1; Totalsection3:= Totalsection3 + Payment; Writeln (Name, 'is in section3'); End  else  If (Payment= 465) or (payment=365) Then Begin Countsection4:= Countsection4 + 1; Totalsection4:= Totalsection4 + Payment; Writeln (Name, 'is in section4'); End  else  If (Payment= 532.5) or (payment=435.5) Then Begin Countsection5:= Countsection5 + 1; Totalsection5:= Totalsection5 + Payment; Writeln (Name, 'is in section5'); End  else  Writeln ('The Value Entered is Invalid'); Writeln ('Enter Name of next Masqueraders or Press Enter to end'); Readln (Name); End; Writeln ('Section 1', ('                           '), Countsection1, ('                                                    \$'), Totalsection1); Writeln ('Section 2', ('                           '), Countsection2, ('                                                    \$'), Totalsection2); Writeln ('Section 3', ('                           '), Countsection3, ('                                                    \$'), Totalsection3); Writeln ('Section 4', ('                           '), Countsection4, ('                                                    \$'), Totalsection4); Writeln ('Section 5', ('                           '), Countsection5, ('                                                    \$'), Totalsection5); End.