Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
116327 云朵 13自由落体 C++ Compile Error 0 MS 0 KB 281 2025-04-08 19:05:06

Tests(0/0):


Code:

#include <iostream> #include <iomanip> using namespace std; int main() { double s=100,n=100; int i; for(i=1;i<11;i++) { n/=2; if(i<10) s+=2*n } printf("%.6",s); cout<<" "; printf("%.6",n); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:5: error: expected ';' before '}' token
     }
     ^
Main.cc:14:19: warning: conversion lacks type at end of format [-Wformat=]
     printf("%.6",s);
                   ^
Main.cc:14:19: warning: too many arguments for format [-Wformat-extra-args]
Main.cc:16:19: warning: conversion lacks type at end of format [-Wformat=]
     printf("%.6",n);
                   ^
Main.cc:16:19: warning: too many arguments for format [-Wformat-extra-args]