Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~6K People Reached
Favorite Forums
Favorite Tags
c x 4
Member Avatar for potato_bum

hi im asked to read data inputs from a text file in c. my problem is i dont know to separate the values, ex. may data contains these: 1.00:2.00:3.00 i would like to assign the values a = 1:00, b = 2.00, c =3.00. how is it done? thanks!

Member Avatar for Ancient Dragon
0
92
Member Avatar for potato_bum

for example.. number.txt: (has these contents) 1.75:2.00:3.00 2.00:5.00:7.24 3.00:6.35:1.00 -- my source code is.. [code=c] #include <stdio.h> int main() { FILE *infile; double a, b, c; char d; double sum; infile = fopen("number.txt", "r"); if(infile == NULL) { printf("number DOES NOT EXISTS!"); } else { while(!foef(infile)) /*here's my problem*/ { …

Member Avatar for Aia
0
5K
Member Avatar for potato_bum

for example.. number.txt: (has these contents) 1.75:2.00:3.00 2.00:5.00:7.24 3.00:6.35:1.00 -- my source code is.. #include <stdio.h> int main() { FILE *infile; double a, b, c; char d; double sum; infile = fopen("number.txt", "r"); if(infile == NULL) { printf("number DOES NOT EXISTS!"); } else { while(!foef(infile)) /*here's my problem*/ { fscanf(infile, …

Member Avatar for thekashyap
0
1K