Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions show_sum/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>

int main( void ) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Style issue:
Original code:

↓
int·main(·void····)······{↓

Fixed code:

↓
int·main(void)·{↓

size_t one;
size_t two;
size_t sum;
std::cout << "Enter the first number: ";
std::cin >> one;
std::cout << "Enter the second number: ";
std::cin >> two;
sum = one + two;
std::cout << "The sum of " << one << " and " << two << " is " << sum << std::endl;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Style issue:
Original code:

····sum·=·one·+·two;↓
····std::cout·<<·"The·sum·of·"·<<·one·<<·"·and·"·<<·two·<<·"·is·"·<<·sum·<<·std::endl;↓
·}```
Fixed code:
```diff
····sum·=·one·+·two;↓
····std::cout·<<·"The·sum·of·"·<<·one·<<·"·and·"·<<·two·<<·"·is·"·<<·sum↓
··············<<·std::endl;↓
}```