All pastes #762063 Raw Edit

Etwas

public cpp v1 · immutable
·published 2007-11-05 09:52 UTC
rendered paste body
#include <iostream.h>#include <conio.c>#include <time.h>int eingabe, teilzahl, i, berechnung;void main () {    cout << "Geben Sie eine Zahl ein um zu ueberpruefen ob sie eine Primzahl ist ";    cin >> eingabe;    teilzahl = 1;    for (i = 2; i < eingabe; i ++) {        if (eingabe % i == 0) {            teilzahl ++;        }    }    if (teilzahl > 2) {        cout << "keine Primzahl" << endl;        }    else {        cout << "Primzahl gefunden!" << endl;    }    getch();}