you could try this and you won't need floats (unless you got .5 in a score):
#include <iostream>
Code:using namespace std; int main() { int total; int score; int percent; cout<<"What is the total score? "; cin>> total; cout<<"What is your score? "; cin>> score; percent = ( score*100 ) / total; cout<<"Your percentage mark is: "<< percent <<"\n"; return 0; }