Zum Inhalt springen

theosoft

Mitglieder
  • Gesamte Inhalte

    2
  • Benutzer seit

  • Letzter Besuch

  1. @nic_power yep, mein Beispiel dachte ich für eiinstellige Zahlen ... und nur als Anregung zum weiterdenken
  2. Mal quick & dirty nur ein Beispiel, das ein mögliches Prinzip zeigt. #include <conio> #include <iostream> int main() { int i[10] = {1,2,2,2,2,4,4,5,6,7}; int anzahl[10] = {0,0,0,0,0,0,0,0,0,0}; int wert; for(int z=0; z<10; z++) { wert = i[z]; anzahl[wert]++; } for(int z=0; z<10; z++) cout << z << " kommt " << anzahl[z] << " mal vor " << endl; getch(); return 0; } [/PHP] Viel Erfolg, Theosoft

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...