I've only been programming for 3 months. Excuse me for not knowing everything, I do what my professor teaches me. If that's a bad method, then oh well. But thank you for being so upstanding.
Type: Posts; User: randyjohnson
I've only been programming for 3 months. Excuse me for not knowing everything, I do what my professor teaches me. If that's a bad method, then oh well. But thank you for being so upstanding.
Come on guys, I'm really desperate here I just need to get this done so I can pass the semester. I'm getting to the point where I'll give 10 bucks via paypal to anyone who can get this running. I've...
I've been making lots of modifications to the code but I still can't get this to work right. Can anyone help?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct...
I adapted the code I'm using from a text book example, I tried to modify to make it fit for my project so that would explain the unused variables.
It compiles and runs for me and lets me enter some employee details but the problem I'm having is the output isn't coming out correctly. It seems to pick a random first name from one of the employees...
Here is my problem: Write a program that utilizes a structure and linked list to store employee information taken from the keyboard (first name, last name, three digit employee id number). The...
You have to do it with the total though like if the UPC was 681131700085, after calculating the total comes to 85. If the last digit is 0 then that's the check digit but if it's not (which it's not...
This is the last part of the problem. If you guys can help at all you will be my freaking heroes: If the last digit in the total is 0, then the check digit is 0; otherwise subtract the last digit...
In class he was giving us examples with int arrays but the assignment itself just says array and doesn't specify. So I assume it would be fine
Camel-man, is that using an array though? That's the only option I have with the assignment
All I have right now is what you gave me earlier pretty much
#include <stdio.h>
int main(void)
{
int a[12], i, sumEven, sumOdd, total;
printf("Type in one number of the UPC code and...
I tried that and had it print out the total for both sumEven and sumOdd and it's still counting the last digit in the array even with this
for(i=0;i<11; i+=2)
Apparently the 12th digit in the array is not actually supposed to be counted. Is there a simple adjustment I can make so that this is the case with the code that's already written?
Haha man you are seriously awesome. I'm sorry for being bothersome I just really want to get this done. Thank you for all the help
Okay this is what I have set up so far
int a[12], i, sumEven, sumOdd, total, entry;
printf("Type in one number of the UPC code and press enter");
for(i=0;i<=12;i++){
scanf("%d\n", &a[i]);}...
Sorinx, how would I go about doing that method? Not to be a pain in the ass, but I'm pretty lost here. I've only been working with C for a few weeks now.
Yes I have to store 1 UPC code into an array and then add the odd/even positions in the array. Will the for loop work for that?
I'm horrible at C and I have to write a program for class that's due tomorrow that has to do with UPC codes. Basically I'm supposed to prompt the user for a 12 digit UPC and then check to see if it's...
That's actually very interesting, thank you I'll add that in as well.
Okay, you two are my saviors.
I changed from int to double for fraction and total and wrote it like this:
double fraction = 1.0 / i;
double total = 0.0;
Though I kept i as an int and my...
I was wondering if anyone can help me out with this. I'm new to C and I'm having a bit of difficulty with this problem:
Write a program using nested loops that demonstrates the problem of...
I have rewritten the code and this is what I have for now and I think my calculations are correct but the point of this problem is for me to learn how to use reference parameters and I know I'm not...
I'm not exactly the best when it comes to coding so I'm having some trouble right now. This is my problem:
Determine the following information about a positive integer that is passed to
a...