Browse Source

simplify main functions

webturing 4 years ago
parent
commit
aa9fadfb46
7 changed files with 7 additions and 7 deletions
  1. 1 1
      A.cpp
  2. 1 1
      C.cpp
  3. 1 1
      D.cpp
  4. 1 1
      E.cpp
  5. 1 1
      G.cpp
  6. 1 1
      L.cpp
  7. 1 1
      M.cpp

+ 1 - 1
A.cpp

@@ -2,7 +2,7 @@
 
 using namespace std;
 
-int main(int argc, char const *argv[]) {
+int main() {
     double a, b, c;
     cin >> a >> b >> c;
     double delta = b * b - 4 * a * c;

+ 1 - 1
C.cpp

@@ -2,7 +2,7 @@
 
 using namespace std;
 
-int main(int argc, char const *argv[]) {
+int main() {
     for (double x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2;) {
         cout << setiosflags(ios::fixed) << setprecision(2)
              << hypot(x1 - x2, y1 - y2) << endl;

+ 1 - 1
D.cpp

@@ -3,7 +3,7 @@
 using namespace std;
 const double pi = atan(1.0) * 4;
 
-int main(int argc, char const *argv[]) {
+int main() {
     for (double r; cin >> r;) {
         cout << setiosflags(ios::fixed) << setprecision(3)
              << 4.0 * pi * pow(r, 3) / 3 << endl;

+ 1 - 1
E.cpp

@@ -2,7 +2,7 @@
 
 using namespace std;
 
-int main(int argc, char const *argv[]) {
+int main() {
     const double PI = atan(1.0) * 4;
     int n;
     double r;

+ 1 - 1
G.cpp

@@ -2,7 +2,7 @@
 
 using namespace std;
 
-int main(int argc, char const *argv[]) {
+int main() {
     for (int m, n; cin >> m >> n;) {
         int x = 0, y = 0;
         for (int i = m; i <= n; i++) {

+ 1 - 1
L.cpp

@@ -2,7 +2,7 @@
 
 using namespace std;
 
-int main(int argc, char const *argv[]) {
+int main(){
     double U, D, H, slope, area, perimeter;
     cin >> U >> D >> H;
     area = (U + D) * H / 2;

+ 1 - 1
M.cpp

@@ -2,7 +2,7 @@
 
 using namespace std;
 
-int main(int argc, char const *argv[]) {
+int main(){
     for (string s; cin >> s; cout << s << endl);
     return 0;
 }