1. ## A Little Help

First off I'm looking for help not someone to do it for me.

My first assignment is: There are 2 midterms, each counting 20% of the grade. The final is worth 25%, and there are 5 programming assignments each worth 7%. Write a program that will prompt the user to enter the grade received on each of these parts (each on a scale of 0.0 - 10.0) and will calculate the final grade in the course.

My second assignment is: Now modify the program in part on as follows. The student is about to take the final exam in the course and would like to know the minimum score they need to get to receive a specific grade. Modify the program to prompt the user for the desired numerical grade (0 - 100.0) and will calculate the grade needed on the final to active the desired result.

This is what I have so far:
Code:
```#include <stdio.h>

int main(int argc, char* argv[])
{
int assignment1;
int assignment2;
int assignment3;
int assignment4;
int assignment5;
int midterm1;
int midterm2;
int final;
float numeric;

printf("Enter assignment1: ");
scanf("%d", &assignment1);
printf("Enter assignment2: ");
scanf("%d", &assignment2);
printf("Enter assignment3: ");
scanf("%d", &assignment3);
printf("Enter assignment4: ");
scanf("%d", &assignment4);
printf("Enter assignment5: ");
scanf("%d", &assignment5);

printf("Enter midterm1: ");
scanf("%d", &midterm1);
printf("Enter midterm2: ");
scanf("%d", &midterm2);

printf("Enter final: ");
scanf("%d", &final);

numeric = ((((assignment1 + assignment2 + assignment3 + assignment4 + assignment5) * .07) + (midterm1 + midterm2) * 0.20) + (final * 0.25));
printf("%d/%d/%d/%d/%d/%d/%d/%d\n", assignment1, assignment2, assignment3, assignment4, assignment5, midterm1, midterm2, final);

return 0;
}```

2. Would you like to ask a question?

3. Yeah what am i missing to make it add each one together. the code u see work but it give me 10/10/10/10/10/10/10/10

4. Am I on the right path so far...

5. each on a scale of 0.0 - 10.0
Those don't look like whole numbers to me. Int's are whole numbers, only.

So no, wrong path there.

6. So all my int's r wrong

7. I've tried changing %d to %1f and %f and all bad commands

8. Does 0.07 * 3.5 (for instance), sound like a whole number, to you?

Did you change the data type?

Honestly, I know it's English you're posting, but I need to see some code here. I could ramble on for days, and completely miss the problem, without seeing the code.

9. That my problem I don't see what I'm missing. I don't know what I have to change you said int but to what the class I'm in we haven't been taut anything but int so far. This is not my first program.
Code:
```

#import <stdio.h>

int main(void){
int n;
printf("Enter a number between 0 and 32767: ");
scanf("%d", &n);

int octal_1, octal_2, octal_3, octal_4, octal_5;

octal_1 = ((((n / 8) / 8) / 8) / 8) % 8;
octal_2 = (((n / 8) / 8) / 8) % 8;
octal_3 = ((n / 8) / 8) % 8;
octal_4 = (n / 8) % 8;
octal_5 = n % 8;

printf("In octal, your number is: %d%d%d%d%d\n", octal_1, octal_2, octal_3, octal_4, octal_5);
return 0;
}```
This one I did and I didn't have a problem.
I'm not stupid just NEW...

10. That my problem I don't see what I'm missing. I don't know what I have to change you said int but to what the class I'm in we haven't been taut anything but int so far. This is not my first program.
So, you used "float" in your program and you have no idea what it does?

Tim S.

11. Your original program had a float in it. So I thought you knew about using a floating point data type for variables holding something other than whole numbers.

For most purposes, I prefer doubles to floats, since they give greater accuracy than float types. I'd use double data types, instead of int's.

I never said you were stupid - just that I can't tell from a description, the details of a program that you have changed, but not posted yet.

Since you can print decimal values as octal values, immediately, I don't see the purpose to your octal program, at all. Octal is a printf() standard format specification.

12. You're never printing out the (strangely named) variable numeric.
Code:
`printf("%f\n", numeric);`

Code:
`printf("%f\n", numeric);`
It gives me and average score. My code now looks like this
Code:
```#include <stdio.h>
#include <math.h>

int main(int argc, char* argv[])
{
int assignment1;
int assignment2;
int assignment3;
int assignment4;
int assignment5;
int midterm1;
int midterm2;
int final;
float numeric;

printf("Enter assignment1: ");
scanf("%d", &assignment1);
printf("Enter assignment2: ");
scanf("%d", &assignment2);
printf("Enter assignment3: ");
scanf("%d", &assignment3);
printf("Enter assignment4: ");
scanf("%d", &assignment4);
printf("Enter assignment5: ");
scanf("%d", &assignment5);

printf("Enter midterm1: ");
scanf("%d", &midterm1);
printf("Enter midterm2: ");
scanf("%d", &midterm2);

printf("Enter final: ");
scanf("%d", &final);

numeric = ((((assignment1 + assignment2 + assignment3 + assignment4 + assignment5) *.07) + (midterm1 + midterm2) *0.20) + (final * 0.25));
printf("%f\n", numeric);

return 0;
}```

14. It gives me an average not a total what might I change to fix this.

15. 1. Create a variable to hold the "total".
2. Calculate the total and place it in the variable in step 1.
3. Print out the value of the variable in step 1.

Tim S.