From 76c8a0ee7efd9b26487226d05c92650c2dc522d3 Mon Sep 17 00:00:00 2001 From: cs Date: Wed, 13 Nov 2019 21:14:32 +0800 Subject: [PATCH] Modified 3 `.cpp` files, which could not passed compilation. After my correction, all of them can be compiled and executed. --- InputValues.cpp | 4 +++- OutputStatements.cpp | 4 ++-- TypeCasting.cpp | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/InputValues.cpp b/InputValues.cpp index 3be0f01..02c155d 100644 --- a/InputValues.cpp +++ b/InputValues.cpp @@ -2,6 +2,8 @@ #include using namespace std; +int main2(); + int main() { int feet; @@ -36,4 +38,4 @@ int main2() cout << "Age: " << age << endl; return 0; -} \ No newline at end of file +} diff --git a/OutputStatements.cpp b/OutputStatements.cpp index 74f3400..2b9067a 100644 --- a/OutputStatements.cpp +++ b/OutputStatements.cpp @@ -10,7 +10,7 @@ int main() cout << 29 / 4 << endl; cout << 3.0 / 2 << endl; cout << "Hello there.\n"; - cout << 7 < endl; + cout << 7 << endl; cout << 3 + 5 << endl; cout << "3 + 5"; cout << endl; @@ -20,4 +20,4 @@ int main() cout << 2*b << endl; return 0; -} \ No newline at end of file +} diff --git a/TypeCasting.cpp b/TypeCasting.cpp index 2d9f915..b1cef67 100644 --- a/TypeCasting.cpp +++ b/TypeCasting.cpp @@ -25,7 +25,7 @@ int main() << static_cast(7.8 + static_cast(15) / 2) << endl; cout << "static_cast(7.8 + static_cast(15/2) = " - << static_cast(7.8 + static_cast(15/2) + << static_cast(7.8 + static_cast(15/2)) << endl; return 0; -} \ No newline at end of file +}