运行 ❯
获取
您自己的
网站
×
更改方向
更改主题,深色/浅色
转到 Spaces
#include <stdio.h> 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; }
用户百分比为 84.60