-
-
Notifications
You must be signed in to change notification settings - Fork 50
feat: menambahkan program cek bilangan pronic #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: V1337Q <[email protected]>
int main() { | ||
while (true) { //Supaya tidak harus menjalankan kode setiap mau mengetes angka baru. | ||
int n; | ||
std::cout << "Masukkan sebuah angka: "; | ||
std::cin >> n; | ||
|
||
// Perform fungsi adalah_pronic() dengan mengambil input n yang sudah dimasukkan user sebagai parameter dan menampilkan output | ||
if (adalah_pronic(n)) { | ||
std::cout << n << " Merupakan bilangan pronic." << "\n"; | ||
} else { | ||
std::cout << n << " Bukan merupakan bilangan pronic." << "\n"; | ||
} | ||
} | ||
|
||
|
||
return 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format dengan clang-format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oke ngab sek
Co-authored-by: arfy slowy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Menerima suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format kode dengan clang-format
There was a problem hiding this 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 @V1337Q
terima kasih atas kontribusinya @V1337Q! |
Deskripsi (Description)
Menambahkan program sederhana untuk mengecek apakah suatu input angka merupakan bilangan pronic.
Checklist:
Umum:
Contributor Requirements (Syarat Kontributor) dan Lain-Lain:
Environment
Saya menggunakan (I'm using):
OS
=Linux
g++
=15.2.1
Link Issues
Issues : #