OMG......I JUST DID IT!!!! IT PRINTS OUT THE CORRECT FORMAT!!!!!!! AHH I"M EXTREMELY HAPPY RIGHT NOW OMG. Okey, now I have to work on the loops for checking if the input is correct or not. I will...
Type: Posts; User: kal123456
OMG......I JUST DID IT!!!! IT PRINTS OUT THE CORRECT FORMAT!!!!!!! AHH I"M EXTREMELY HAPPY RIGHT NOW OMG. Okey, now I have to work on the loops for checking if the input is correct or not. I will...
Ohh, okey, I undestand how to check if the input is correct or not now, thank you!!
I wrote some fast code just now, but without checking if the input is correct. I plainly enter a number, for...
Hey everyone,
I'm stuck on a relatively easy homework:
"Write a program to parse user’s input of a telephone number. Your program should accept a string in any of the following format:
...
Hey everyone,
so I have a very simple program here, and somehow I can't get it to print out a two-dimensional array. Any ideas on what I might be doing wrong?
here's my code:
#include...
Hey!! I JUST FIXED MY PROBLEMS AND I"M DONE WITH THE HOMEWORK!! Matticus you were right, I didnt print the total_sales[i] to my output file!! and I fixed the part about comp too, so now everything...
NEVERMIND ACTUALLY, I FOUND MY ERROR, SO NOW I CAN PRINT THE TOTAL/PERSON.
the only LASTT problem is that I cant print the Total Sales for each week!! I print it fine in my calcSales function, the...
Ok guys, I'm back, I knew it -_____- soooo, just now I realized that when I calculated the total amount of sales each person had for all 4 weeks, the amount should have been stored in a one...
OMG.....YOU GUYS ARE SERIOUSLY AMAZING!!! it would take me half a day to realize that I was passing in the wrong array!! DUHH of course it would print me 0.0000 cause there are no values in the...
Oh, yes, my assignment requires us to make a function that prints all the data out to the screen, I just thought I would work on that later when I got all the data to print in the separate...
Hey everyone!
So i posted about this assignment earlier, but i had a completely different problem, so I decided to make a new thread!
So, here is the assignment:
Project: Sales Tables
...
I JUST DID THAT AND IT WORKED!!! thanks so much!! :)
so would i do something like this?
int num_rows = namesArray[0][0];
since the first row and column of the array is 16 in this case? the teachers doesnt really want us to output the number...
@AndiPersti Thanks, I actually got my program to print the table correctly! the only problem is that now I want the first element of the array not to be read...for example, the names.txt file looks...
Ohh ok, that makes sense that i would rather use what I already defined then creating new integers, thanks! and I fixed up my code, I made the getSales function look exactly like the getNames...
Ok, i'll indent it right now!
and in the getSales function, i wrote:
int col=6;
int row=25;
so i made the max number of columns be 6, and the mas number of rows 25. I also defined...
I'm really sorry that I'm speeding through this, but it's due by today midnight, and I'm just really nervous -___- Thanks for clearing the fgetc thing out! I'm using that in my code now, so the...
Oh, and also, I'm not allowed to use strings when I read the names....Im supposed to read in one character at a time...
@Matticus -- Yes, i just read the link!! I tried doing what it said in the link, but my code got all messed up, so I'm trying to see if nonpuz's way will work....I'm so confused!!
@nonpuz -- I...
no it doesnt!! i had to add what @camel-man suggested,
if(namesArray[i][j]==',') printf("\n");
However, now it outputs a slightly different output, the commas are misarranged!! it looks like...
ya im on a windows machine and here's my code:
#include <stdio.h>
#define INPUT_FILE_GET_NAMES "names.txt"
#define INPUT_FILE_GET_SALES "sales.txt"
#define MAX_ROWS_NAMES 25
#define...
OMG.........it actually works!!!! only now, the last problem, how do I get it to look exactly like the txt file? like this:
16
Kelly, Victor
Lam, Gary
Nagasake, David ...
Ohh ok, so I changed the %d to %c which means that now it should be printing characters instead of integers. However, now it doesn't output anything, just a blank space haha.....what do you mean by...
Ohhh, so then how do i change it to read characters?
ok now i get it to print something, but instead of printing out the contents of the txt file, it just prints:
0000000000000000000000000
Process returned 0 (0x0) execution time : 0.055 s...
Ohh ok! I don't think I'm gonna make one function do the same 2 things, cause my teacher prefers us to write 2 separate functions, but thanks for letting me know, i'll use it in the future! so I just...