Search:

Type: Posts; User: jasmin89

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,596

    Thanks! It worked

    Thanks! It worked
  2. Replies
    2
    Views
    1,596

    Delete line when previous line is same

    Hello, I would like to read a text file and delete those lines that occur twice. The single values are separated with a semicolon. I parse the data and distinguish by date. If the current date is the...
  3. Replies
    3
    Views
    2,236

    Thank You for the help

    Thank You for the help
  4. Replies
    3
    Views
    2,236

    Saving data into a array with snprintf

    Hello,

    I have this code which read some data from a text file. Then I save the data into a 2D array dynamically with malloc. Until codeline 57 this works fine. Then I would like to append some...
  5. Replies
    5
    Views
    10,562

    Thanks for the help now it works: #include...

    Thanks for the help now it works:


    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
    #include <string.h>

    FILE *read_file(char* filename)
    {
  6. Replies
    5
    Views
    10,562

    Ok Thanks for the help. I have now tried another...

    Ok Thanks for the help. I have now tried another approach. I am able to read the data in with the written function read_data().


    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
  7. Replies
    5
    Views
    10,562

    Read data from a .csv file in c

    Hello, I have written a small C programm where I can read data in from a .csv file. This works fine.

    But now I want to create a function to read the data in. So I want modify my programm.

    I...
  8. Replies
    5
    Views
    3,999

    Here is the .csv file. I get no compiling error.

    Here is the .csv file. I get no compiling error.
  9. Replies
    5
    Views
    3,999

    Program C fix

    I have measured data divided into 100 steps. I want to read this data in C and save the temperature as a latex file. It should be output with a nice temperature curve. On the Y axis the temperature...
  10. Replies
    9
    Views
    7,557

    Thanks, very nice

    Thanks, very nice
  11. Replies
    9
    Views
    7,557

    I have tried another try, but i get this error:...

    I have tried another try, but i get this error: error: invalid opeands to binary * ( have #long long unsigned int' and 'char')



    #ifdef _MSC_VER
    #define _CRT_SECURE_NO_WARNINGS
    #endif
    ...
  12. Replies
    9
    Views
    7,557

    Repeat program in C

    Hi, I tried to write a C program which duplicates the content of a string. For example I typed "3 Test" and it should come out like this: "TestTestTest".

    But for me it comes out "3 Test 3 Test 3...
  13. Thread: Copy function

    by jasmin89
    Replies
    2
    Views
    3,045

    Thank you, it works

    Thank you, it works
  14. Thread: Copy function

    by jasmin89
    Replies
    2
    Views
    3,045

    Copy function

    I am struggling at the following task:

    Write a function called copy which takes the following parameters:

    -Two integer arrays
    -The size of the two arrays as an integer
    -A...
  15. Replies
    8
    Views
    4,132

    Thank you. It is clear now for me. To do while...

    Thank you. It is clear now for me. To do while loop is very helpful.
  16. Replies
    8
    Views
    4,132

    For my example the checksum is 19. But i want now...

    For my example the checksum is 19. But i want now that my function dsum calculate the checksum again, until the sum of the digits contains only one number

    For example:
    199 => 19
    19 => 10
    10 =>...
  17. Replies
    8
    Views
    4,132

    Sum of digits in C

    Hello,

    I have written in C a program that calculate the sum of digits (for a number).

    For Example for the number 199 the checksum is 19.

    But now i want that my program also calculate the...
  18. Thread: Dice

    by jasmin89
    Replies
    12
    Views
    5,776

    Yes i want to have something like that. Thank you...

    Yes i want to have something like that. Thank you for your help, very friendly. Now it is clear for me.
  19. Thread: Dice

    by jasmin89
    Replies
    12
    Views
    5,776

    Yes, sure i want to add the 6. Because i want to...

    Yes, sure i want to add the 6. Because i want to simulate the average also when i diced a 6. (The rule of the game is if i diced a 6 i can dice it again -Until there is no more 6)

    But i think i...
  20. Thread: Dice

    by jasmin89
    Replies
    12
    Views
    5,776

    Ok but when i change this in the code i get...

    Ok but when i change this in the code i get numbers higher than 6... But i want to have only numbers from 1-6.
  21. Thread: Dice

    by jasmin89
    Replies
    12
    Views
    5,776

    Ok, for me it is not really clear. Do you mean...

    Ok, for me it is not really clear. Do you mean that i must the write the return result outside of the loop. Like this:


    int croll(void)
    {

    int result=0;
    int z = 0;
    do {
    ...
  22. Thread: Dice

    by jasmin89
    Replies
    12
    Views
    5,776

    Thanks for the help. But i have a modified my...

    Thanks for the help. But i have a modified my program a little bit.

    In the main() i am calculating the dicing for 1000 times and I am calculating the average. (this average is my result)

    ...
  23. Thread: Dice

    by jasmin89
    Replies
    12
    Views
    5,776

    Dice

    Hi,

    i am writing a programm which what should have the following functionality:

    The computer is dicing, if the computer has diced no 6 we return the number of points, if he rolled a 6 he roll...
  24. Replies
    10
    Views
    7,485

    Ok, fine. When i type in now -0.05 i got this...

    Ok, fine.

    When i type in now -0.05 i got this result: -0.05= 0.00

    How can i write this output
    printf("%.2f = %.2f", i, rel(i));

    to get this result: 0
    I only want the output as result...
  25. Replies
    10
    Views
    7,485

    But when i make i to a double i get this error in...

    But when i make i to a double i get this error in line21:



    int main() {
    double i = read_data;

    printf("%.2f = %.2f", i, rel(i));
    }
Results 1 to 25 of 31
Page 1 of 2 1 2