Skip to content

Conversation

@yusuf601
Copy link
Contributor

@yusuf601 yusuf601 commented Oct 9, 2025

Deskripsi (Description)

Menambahkan source code untuk mensimulasikan deret geometri.

Program ini menyediakan implementasi komprehensif untuk melakukan berbagai operasi terkait deret geometri, termasuk:

  • Menghitung rasio (r) antara dua atau lebih suku dalam deret.
  • Menentukan suku ke-n (Un) dari deret geometri dengan memanfaatkan rasio dan suku awal.
  • Menampilkan rumus umum dari deret dalam bentuk string agar mudah dibaca dan dipahami.

Seluruh implementasi dirancang dengan menggunakan konsep three pair, yaitu memusatkan logika utama pada fungsi yang menerima input iterator.
Dengan pendekatan ini, versi overload lain seperti yang menerima std::initializer_list atau std::ranges::input_range cukup melakukan delegasi (memanggil) fungsi utama tersebut tanpa perlu duplikasi logika.

Checklist:

Umum:
  • Saya menambah algoritma terbaru.
Contributor Requirements (Syarat Kontributor) dan Lain-Lain:
  • Saya sudah membaca (I have read) CONTRIBUTING dan sudah menyetujui semua syarat.
  • Saya telah menambahkan komentar kode yang memberikan penjelasan maksud dari kode yang saya buat.
  • Saya menggunakan bahasa Indonesia untuk memberikan penjelasan dari kode yang saya buat.

Environment

Saya menggunakan (I'm using):

  • OS = Linux
  • g++ = 15.2.1

Link Issues

Issues : #

@yusuf601 yusuf601 requested a review from slowy07 as a code owner October 9, 2025 15:24
@mergify mergify bot added the cpp file label Oct 9, 2025
*/
template <std::input_iterator It>
requires(std::integral<std::iter_value_t<It>>)
std::string rumus_suku_KeN(It first,It last){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
std::string rumus_suku_KeN(It first,It last){
std::string rumus_suku_KeN(It first,It last) {

return rumus_suku_KeN(R.begin(),R.end());
}
int main(){
using namespace std;
Copy link
Member

Choose a reason for hiding this comment

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

using namespace std; ?

Comment on lines +72 to +73
}
/**
Copy link
Member

Choose a reason for hiding this comment

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

tidak ada jarak

Copy link
Member

@slowy07 slowy07 left a comment

Choose a reason for hiding this comment

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

LGTM, terima kasih atas kontribusinya @yusuf601

@mergify mergify bot merged commit 70e65ee into bellshade:main Oct 10, 2025
4 of 8 checks passed
@mergify
Copy link

mergify bot commented Oct 10, 2025

terima kasih atas kontribusinya @yusuf601!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants