Arduino ile 2^128 hesaplayan yazılımı ChatGPT ile beraber yazdık

// Define the number of digits required to store the result
#define NUM_DIGITS 40

void setup() {
  Serial.begin(9600);
  
  // Define the array to store the result
  int result[NUM_DIGITS] = {0};

  // Set the first digit to 1
  result[0] = 1;

  // Calculate 2^128 iteratively
  for (int i = 0; i < 128; i++) {
    int carry = 0;

    // Multiply each digit of the result by 2 and add the carry from the previous digit
    for (int j = 0; j = 0; i--) {
    Serial.print(result[i]);
  }
}

void loop() {
  // Nothing to do here
}

Wowki

https://wokwi.com/projects/361996755593355265

ChatGPT ile olan diyaloğumuz altaki resimde görülüyor

Published by

Unknown's avatar

BeMelaB

"A passionate and enthusiastic engineer among many engineers."

One thought on “Arduino ile 2^128 hesaplayan yazılımı ChatGPT ile beraber yazdık”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.