Stuff
public text v1 · immutable//Daniel Pfeil
//Quersumme
//25.09.2006
#include <conio.h>
#include <iostream.h>
int main()
{
int qs=0;
int zahl=0;
int rest=0;
cout << "Zahl eingeben:\n";
cin >> zahl;//zahl einlesen
do{
rest=zahl%10;
qs=qs+rest;
zahl=zahl/10;
}while(zahl>0);//Abbruch, wenn zahl = 0 ist
cout << "\nQuersumme: ";
cout << qs;
getch();
return 0;
}