Code Monkey home page Code Monkey logo

ipi's Introduction

IPI

Das ist meine Codes für IPI Übungsblatt 4 Aufgabe 3.

Eine natürliche Zahl ist vollkommen, wenn sie gleich der Summe ihrer Teiler ist, sich selbst ausgenommen.

Die Zahl 6 = 1 + 2 + 3 ist die kleinste vollkommene Zahl, die nächstgrößere ist 28 = 1 + 2 + 4 + 7 + 14.

Gesucht ist ein Programm, das die kleinste vollkommene Zahl bestimmt, die größer oder gleich einer gegebenen Zahl ist. Implementieren Sie dazu die folgenden Funktionen:

(a) bool teiler (int teiler, int zahl) entscheidet, ob zahl durch teiler geteilt wird,

(b) int teileranzahl (int index, int anzahl, int zahl) bestimmt die Anzahl der Teiler von zahl im Intervall {1, . . . , zahl − 1},

(c) int teilersumme (int index, int summe, int zahl) bestimmt die Summe aller Teiler von zahl im Intervall {1, . . . , zahl − 1},

(d) bool vollkommen (int zahl) entscheidet, ob zahl vollkommen ist,

(e) int suchevollkommen (int zahl) bestimmt die kleinste vollkommene Zahl, die größer oder gleich zahl ist.

(f) Bestimmen Sie mit der Funktion suchevollkommen die beiden nächstgrößeren vollkommenen Zahlen nach 28.

ipi's People

Contributors

heyjing avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.