User Tools

Site Tools


tanszek:oktatas:szamitastechnika:vektorok_peldak_2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tanszek:oktatas:szamitastechnika:vektorok_peldak_2 [2022/09/05 21:30] – létrehozva kneheztanszek:oktatas:szamitastechnika:vektorok_peldak_2 [2023/11/28 19:56] (current) knehez
Line 137: Line 137:
     int tomb[] = {10, 20, 10, 1, 100, 10, 2, 1, 5, 10, 32};     int tomb[] = {10, 20, 10, 1, 100, 10, 2, 1, 5, 10, 32};
     int n = sizeof(tomb) / sizeof(int);     int n = sizeof(tomb) / sizeof(int);
-    int tomb2[n]; +
-    int i, j, k = 0;+
     int dupla = 0;     int dupla = 0;
-    for(i = 0; i < n - 1; i++)+ 
 +    for(int i = 0; i < n - 1; i++)
     {     {
-        for(j = i + 1; j < n; j++)+        for(int j = i + 1; j < n; j++)
         {         {
             if(tomb[i] == tomb[j])             if(tomb[i] == tomb[j])
Line 155: Line 155:
     }     }
  
-    for(i = 0; i < n; i++)+    for(int i = 0; i < n; i++)
     {     {
         printf("%d ", tomb[i]);         printf("%d ", tomb[i]);
tanszek/oktatas/szamitastechnika/vektorok_peldak_2.1662413420.txt.gz · Last modified: 2022/09/05 21:30 by knehez