- #1
Marta
- 4
- 0
#include<stdio.h>
main()
{
int zipcode,numdem,numrep,sum ;
double perdem, perrep;
While(zipcode!= -1111){
printf("please enter zipcode");
scanf("%d",&zipcode);
printf("please enter numdem)'
scanf("%d",&numdem);
printf("please enter numrep");
scanf("%d",&numrep);
zipcode, zipcoderep;max amountregisvoters
sum=numdem+numrep;district=district+1
perdem=(dem/totalregvoters)*100;
perrep=(rep/totalregvoters)*100;
if(dem<rep)
printf("there are more republicans");
if(dem>rep)
printf("there are more democrats");
if(dem==rep)
printf("the number of democrats and republicans are the same");
printf("\n\n\n\n\n");
}
return0
}
main()
{
int zipcode,numdem,numrep,sum ;
double perdem, perrep;
While(zipcode!= -1111){
printf("please enter zipcode");
scanf("%d",&zipcode);
printf("please enter numdem)'
scanf("%d",&numdem);
printf("please enter numrep");
scanf("%d",&numrep);
zipcode, zipcoderep;max amountregisvoters
sum=numdem+numrep;district=district+1
perdem=(dem/totalregvoters)*100;
perrep=(rep/totalregvoters)*100;
if(dem<rep)
printf("there are more republicans");
if(dem>rep)
printf("there are more democrats");
if(dem==rep)
printf("the number of democrats and republicans are the same");
printf("\n\n\n\n\n");
}
return0
}
Last edited: