We i compile this program is shows that percents as 0.... any suggestions.
#include <stdio.h>
#include "simpio.h"
#include "strlib.h"
#include "random.h"
#include <math.h>
int main()
{
int g1, g2, g3, g4, w1, w2, w3, w4, p1, p2, p3, p4;
string n1;
string n2;
string n3;
string n4;
//-------------------------------------------//
printf("Enter first name: ");
n1 = GetLine();
printf("Enter games played for %s: ", n1);
g1 = GetInteger();
printf("Enter games won for %s: ", n1);
w1 = GetInteger();
//-------------------------------------------//
printf("\n");
//-------------------------------------------//
printf("Enter second name: ");
n2 = GetLine();
printf("Enter games played for %s: ", n2);
g2 = GetInteger();
printf("Enter games won for %s: ", n2);
w2 = GetInteger();
//-------------------------------------------//
printf("\n");
//-------------------------------------------//
printf("Enter thrid name: ");
n3 = GetLine();
printf("Enter games played for %s: ", n3);
g3 = GetInteger();
printf("Enter games won for %s: ", n3);
w3 = GetInteger();
//-------------------------------------------//
printf("\n");
//-------------------------------------------//
printf("Enter fourth name: ");
n4 = GetLine();
printf("Enter games played for %s: ", n4);
g4 = GetInteger();
printf("Enter games won for %s: ", n4);
w4 = GetInteger();
//-------------------------------------------//
printf("\n");
printf("\n");
//-------------------------------------------//
//---------------Calculations----------------//
p1 = w1/g2*100;
p2 = w2/g2*100;
p3 = w3/g3*100;
p4 = w4/g4*100;
//-------------------------------------------//
printf("Name Games Played Games Won Winning %\n");
printf("---- ------------ --------- ---------\n");
printf("%s %d %d %d\n", n1, g1, w1, p1);
printf("%s %d %d %d\n", n2, g2, w2, p2);
printf("%s %d %d %d\n", n3, g3, w3, p3);
printf("%s %d %d %d\n", n4, g4, w4, p4);
system("pause");
}