Search:

Type: Posts; User: daggg

Search: Search took 0.00 seconds.

  1. Replies
    42
    Views
    18,755

    thank you so much for your help... array -5...

    thank you so much for your help...

    array -5 -3 -2 1 7 -8 9
    k=2

    no negative, only positive result...here it would be:7
  2. Replies
    42
    Views
    18,755

    it's good now...one more question..how i can...

    it's good now...one more question..how i can print only positive numbers at the end...you were so helpful...thank you.
  3. Replies
    42
    Views
    18,755

    for(i=0;i

    for(i=0;i<n;i++){
    if(i%k == 0)
    {
    indikator = 1;
    printf("%d ",brojevi[i]);
  4. Replies
    42
    Views
    18,755

    3 should be here right output

    3 should be here right output
  5. Replies
    42
    Views
    18,755

    prints only number that are divided by the k

    prints only number that are divided by the k
  6. Replies
    42
    Views
    18,755

    Then it prits out numbers divided by k, not the...

    Then it prits out numbers divided by k, not the index15755
  7. Replies
    42
    Views
    18,755

    No, i don't know... help me

    No, i don't know... help me
  8. Replies
    42
    Views
    18,755

    Result should be here 4. Right?

    Result should be here 4. Right?
  9. Replies
    42
    Views
    18,755

    This...15754

    This...15754
  10. Replies
    42
    Views
    18,755

    if(i%k == 0) This doesn't give good result

    if(i%k == 0)

    This doesn't give good result
  11. Replies
    42
    Views
    18,755

    Feel free to shoot me, or show me complete code :)

    Feel free to shoot me, or show me complete code :)
  12. Replies
    42
    Views
    18,755

    So, how to fix this?

    So, how to fix this?
  13. Replies
    42
    Views
    18,755

    if(brojevi[i]%k == 0) Isn't this the same?

    if(brojevi[i]%k == 0)

    Isn't this the same?
  14. Replies
    42
    Views
    18,755

    If the index can be divided by the k (input by...

    If the index can be divided by the k (input by the user at the beginning), then I need to printf that element, not the index...
  15. Replies
    42
    Views
    18,755

    Can you please do the whole code here, so I can...

    Can you please do the whole code here, so I can test on my side. Thank you.
  16. Replies
    42
    Views
    18,755

    I already have this in my code... But thanks,...

    I already have this in my code... But thanks, anyway...
  17. Replies
    42
    Views
    18,755

    ok... i agree...help me to set it up for the...

    ok... i agree...help me to set it up for the first option..thanks.
  18. Replies
    42
    Views
    18,755

    I'm looking at it, but don't have the solution yet

    I'm looking at it, but don't have the solution yet
  19. Replies
    42
    Views
    18,755

    "you want the program to return the number if the...

    "you want the program to return the number if the arrays index is devisable by k" yes, this is what i want
  20. Replies
    42
    Views
    18,755

    Here it is

    #include <stdio.h>
    #define MAX 100
    int main()
    {
    int brojevi[MAX];
    int n, i, k, indikator;
  21. Replies
    42
    Views
    18,755

    Index Array simpe task. Need help.

    Array is defined by the user (size & members)
    1 2 3 4 5 6 7 8 9 10

    input k

    if index (not the number) can be divided with the k, then that number (not the index is printed).

    For example

    1...
Results 1 to 21 of 21