Skip to content
This repository was archived by the owner on Jul 27, 2024. It is now read-only.
Open
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"files.autoGuessEncoding": true,
"editor.codeActionsOnSave": null,

"terminal.integrated.shellArgs.windows": [
"-NoExit",
"-Command",
"chcp",
"65001"
],
"files.associations": {
"vector": "cpp"
}
}
32 changes: 0 additions & 32 deletions 1st_program_part2.cpp

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# brains_cpp_study
CITbrains内でのC++勉強会に用いるリポジトリです。
毎週提出によって更新があるので忘れずにpullをしておきましょう。

---

ver hiroki noguchi
Binary file added a.exe
Binary file not shown.
53 changes: 53 additions & 0 deletions atcoder_c_step.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#include <iostream>
#include <vector>

class object
{
public:
void see_answer();
void set();
void Judgment();

private:
long int number_of_people;
long int max_height = 0;
long int sum_height = 0;
std::vector<long>height_list;

};

void object::see_answer()
{
std::cout << sum_height << std::endl;
}
void object::set()
{
std::cin >> number_of_people;
height_list.resize(number_of_people);
for(long loop = 0; loop < number_of_people; loop++)
{
std::cin >> height_list.at(loop);
}
}
void object::Judgment()
{
for(long loop = 0; loop < number_of_people; loop++)
{
if(max_height < height_list.at(loop))
{
max_height = height_list.at(loop);
}
else
{
sum_height += max_height - height_list.at(loop);
}

}
}
int main()
{
object step;
step.set();
step.Judgment();
step.see_answer();
}
51 changes: 0 additions & 51 deletions bato_1.cpp

This file was deleted.

73 changes: 0 additions & 73 deletions bato_2.cpp

This file was deleted.

69 changes: 0 additions & 69 deletions bato_2_EX.cpp

This file was deleted.

42 changes: 42 additions & 0 deletions first.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#include <iostream>

class FizzBuzz
{
public:
void set(int num);
int get();
void judge();

private:
int fizz = 3;
int buzz = 5;
int m_num;
};

void FizzBuzz::set(int num)
{
m_num = num;
}

void FizzBuzz::judge()
{
if(m_num % 3 == 0)
{
std::cout << "Fizz";
}

if(m_num % 5 == 0)
{
std::cout << "Buzz" << std::endl;
}
}

int main()
{
FizzBuzz hiroki;
int num;
std::cin >> num;
hiroki.set(num);
hiroki.judge();
return 0;
}
5 changes: 0 additions & 5 deletions inoue_1.cpp

This file was deleted.

38 changes: 0 additions & 38 deletions kanbe_1.cpp

This file was deleted.

Loading