Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Viewed less than a minute ago

qL9pVi0sxcEDz2Hi

C++ gcc 12.1.0

Created at 2 minutes ago

Created by anonymous

Author

anonymous

2 minutes ago

Language

C++

Compiler

gcc 12.1.0

Options
Warnings
Don't Use Boost
C++11
-pedantic
セオライド・テクノロジー㈱株式会社フィックスターズ
Siv3D

Author

anonymous

2 minutes ago

›
⌄
9
1
2
3
4
5
6
7
8
9
int main(){
double x = 0, r1 = 0, r2 = 0, m1 = 0, m2 = 0;

const double G=6.67408e-11;

double d = x + r1 + r2;
double force = ((m1*m2)/(d*d))*G;
}

$ g++ prog.cc -Wall -Wextra -std=c++11 -pedantic
prog.cc: In function 'int main()':
prog.cc:7:12: warning: unused variable 'force' [-Wunused-variable]
    7 |     double force = ((m1*m2)/(d*d))*G;
      |            ^~~~~
Exit Code:
0
セオライド・テクノロジー㈱株式会社フィックスターズ
Siv3D