i won't beat around the bush and will say that this is an assignment and i'm not that experienced in writing programs. all semester my teacher has had us "trace" programs as of which he would give...
Type: Posts; User: ashlee
i won't beat around the bush and will say that this is an assignment and i'm not that experienced in writing programs. all semester my teacher has had us "trace" programs as of which he would give...
Hm whydo i keep getting 19
#include<stdio.h>
void round (int values[5][5]);
int keep (int num[5][5]);
void main(void){
int first[5][5];
int p, q;
for (p = 0; p < 5; ++p)
for (q = 0; q < 5; ++q)
oh okay so d is just adding up what J was each time it satisfied that for loop and went into the next function. got ya.
yeah the programs really have no point except to help learn functions i...
#include<stdio.h>
float here (float num);
float there (float x);
void main(){
printf("see that = %.2f\n", here(3.5));
}
float here (float num){
int i, c = 0;
any ideas? just cant get this to print. i want it to show.
First Student - GPA 4.0
Second Student - GPA 3.7
Third Student - GPA 2.0
-
-
Twentieth Student - GPA 1.0
main(void)
{
int i, j, k, m, n, p[2][3], q[2][3], r[2][3];
for(i = 0; i < 2; ++i)
for(j = 0; j < 3; ++j)
{
m = i + 3;
n = j + 2;
k = m%n;
yeah, when the } is taken out after the for loop i just get:
0, 2.3
1, 1.0
2, 1.0 and 1.0 for the rest of them up to 20.
any idea why this shows no output?
#include<stdio.h>
int main()
{
float exam_a[20] = { 77, 65, 89, 79, 85, 90, 98, 45, 83, 75, 71, 85, 85, 80, 68, 72, 56, 82, 63, 80} ;
float exam_b[20] = {...
is any calculation really necessary then? can something like
if (student[k] >= 90){
printf("%i, 4.0 \n", k);
}
if (student[k] >= 80){
is there some sort of calculation for just GPA without knowing the credits? i wrote a program which shows the average 20students have each after taking 3 exams each. now i must print the GPA of...
that means it'll go through one last time?
i attached a program with the output that i had on a midterm the other day here -
http://img233.imageshack.us/img233/1452/20101029191753941.jpg
the output being on the right.. i was wondering why...
http://i51.tinypic.com/ejabg0.jpg
i'm doing this program and understand it except for the printf at the end. why is there a %4i$14i there?
sorry about that guys. you are indeed right. it was that ++p.
thanks
#include <stdio.h>
main()
{
int j, k, p = 3;
for (j = 35; j > 0; j = j - 3)
{
if (j%5 == 2)
{
k = j*(j-1)/5;
i knew that!
thanks. we're getting there
sooo we're getting the sum here?
sum += (float)x[i]
and what exactly is %.1f?
okay so it's starting to make sense here. the index is being added by one like a normal array is.. so if the numbers were 4,8,10,11,13 it would add the totals of each even number and then each...
x[i] = 0; thats what is confusing me.. why exactly is that there? x[i] = 0; i is 0 there for setting x[0] to 0?
the output being:
i'm just trying hard to make sense of this program here.
so this
is going to loop each array and check if the remainder is 1. if so then the array = 0?
and then...
thank you for your help
i guess my question is is how do i put this into c?
do i split up this long formula into parts such as first do the beginning... then take that and put it to the power of -12.. then take that and...
so is it just pow(-12) ?
oh okay. guess this tutorial is no good then.