Thanks! It worked
Type: Posts; User: jasmin89
Thanks! It worked
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...
Thank You for the help
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...
Thanks for the help now it works:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
FILE *read_file(char* filename)
{
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>
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...
Here is the .csv file. I get no compiling error.
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...
Thanks, very nice
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
...
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...
Thank you, it works
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...
Thank you. It is clear now for me. To do while loop is very helpful.
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 =>...
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...
Yes i want to have something like that. Thank you for your help, very friendly. Now it is clear for me.
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...
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.
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 {
...
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)
...
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...
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...
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));
}