Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
#include
int main() { // Set the maximum possible score to 500 int maxScore = 500; // The actual score of the user int userScore = 423; // Calculate the percantage of the user's score in relation to the maximum available score float percentage = (float) userScore / maxScore * 100.0; // Print the percentage printf("User's percentage is %.2f", percentage); return 0; }
User's percentage is 84.60