This is an archive of a previous version of Sodarace.

Please visit http://sodarace.net for the latest version.

forum  |  »» sodaplay
 
»» forums  »» community discussion forum

subject: Do you want to learn to program in C

357 replies on 24 pages. most recent reply: Tues, Aug 28 10:58 PM by matthew102000

»» back to topic list  

This topic has 357 replies on 24 pages [ « | 1 ... 7 8 9 10 11 12 13 14 15 ... 24  | » ]
»» previous topic   »» next topic  


matthew102000

»» models

Re: Do you want to learn to program in C   posted: 01-Apr-07 22:41   »» 
i really dont kno of anything else that you could use.

at get thi stupid hotel keybord to work rite. one key at a time.

matt wuz here

ROBO_HEN5000

»» models
»» homepage

Re: Do you want to learn to program in C   posted: 02-Apr-07 14:09   »» 
Yeah, I think maybe I missed an operation, or switched a + and -, or somethin like that.

And you said the same thing about the hotel keyboard in the vending machine thread :P

~~~ROBO~~~

dail8859

»» models
»» homepage

Re: Do you want to learn to program in C   posted: 02-Apr-07 20:18   »» 
Ive got almost 25 pages done. I will hope to post in a few days. I do have some C++ experience but probably not enough to help you out.

ROBO_HEN5000

»» models
»» homepage

Re: Do you want to learn to program in C   posted: 03-Apr-07 21:04   »» 
I sure hope that it has a lot of pictures and junk, cause I don't think i'll be able to read 25 pages of words!

~~~ROBO~~~

dail8859

»» models
»» homepage

Re: Do you want to learn to program in C   posted: 04-Apr-07 20:23   »» 
Here it is. Around 25 pages. Yes there is alot of stuff in it so dont hurt yourself trying to understand it.

http://www.savefile.com/files/608541

matthew102000

»» models

Re: Do you want to learn to program in C   posted: 06-Apr-07 19:54   »» 
wow. thats long.

i just got back from reno. its spring break. the stupid keyboard in my hotel room was screwed up so i havent been able to visit for a while.

well, thats cool. ill be trying to lern it for a while, so ill check in if i need help.

matt wuz here

matthew102000

»» models

Re: Do you want to learn to program in C   posted: 06-Apr-07 23:14   »» 
grr... cant download it. can you try posting it on another site???

matt wuz here

matthew102000

»» models

Re: Do you want to learn to program in C   posted: 07-Apr-07 00:04   »» 
what does it mean when the miricle c program sais:

" Parse Error, expecting `SEP' "

i cant figure out what to do.

matt wuz here

matthew102000

»» models

Re: Do you want to learn to program in C   posted: 07-Apr-07 00:12   »» 
never mind. got it. sorry for all those posts.

matt wuz here

matthew102000

»» models

Re: Do you want to learn to program in C   posted: 07-Apr-07 01:18   »» 
sorry for the fifth post in a row,. but i cant get this to work.

#include <stdio.h>
#include <math.h>
int main (void)
{
float diameter, area, radius, circumference, choice;
{
printf("CIRCLE CIRCUMFERENCE/AREA FINDER\n");
printf("------------------------------------\n \n");
printf("Area or Circumference??? 1=cricumference, 2= area\n \n \t - ");
scanf("%f", &choice);
}
if (choice = 1);
{
printf("What is the diameter of the circle?\n \n \t - ");
scanf("%f", &diameter);
circumference = diameter * 3.14;
printf("\n \t- %f", circumference);
}
else;
{
printf("What is the radius of the circle???\n \n \t - ");
scanf("%f", &radius);
area = (radius * radius) * 3.14;
printf("\n \n \t \t = %f", area);
}
scanf("%c");
return 0;
}

it is an extension to my circumference finder, but i cant get it work rite. this one will be able to find the area of a circle as well, and ive alredy tested the area part to see if it works, and it does. its a problem with the if statement. please fix it somebody. ill be waiting.

thanks for all the help you guys have been. withought you guys, none of my programs would work. thanks again!

matt wuz here

cactus2

»» models

Re: Do you want to learn to program in C   posted: 07-Apr-07 14:54   »» 
#include <stdio.h>
#include <math.h>
int main (void)
{
float diameter, area, radius, circumference, choice;
{
printf("CIRCLE CIRCUMFERENCE/AREA FINDER\n");
printf("------------------------------------\n \n");
printf("Area or Circumference??? 1=cricumference, 2= area\n \n \t - ");
scanf("%f", &choice);
}
if (choice == 1);
{
printf("What is the diameter of the circle?\n \n \t - ");
scanf("%f", &diameter);
circumference = diameter * 3.14;
printf("\n \t- %f", circumference);
}
else
{
printf("What is the radius of the circle???\n \n \t - ");
scanf("%f", &radius);
area = (radius * radius) * 3.14;
printf("\n \n \t \t = %f", area);
}
scanf("%c");
return 0;
}

Simple mistake. it needs to be "==" instead of "="
Also, the else does not need a semicolon.

matthew102000

»» models

Re: Do you want to learn to program in C   posted: 07-Apr-07 18:21   »» 
thanks for the help, but there is still a problem with it. its saying:

" un-recgognized types in comparison "

for the first if statement.

pleas help. i cant figure out what i am supposed to do.

thanks,

matt wuz here

cactus2

»» models

Re: Do you want to learn to program in C   posted: 07-Apr-07 20:04   »» 
#include <stdio.h>
#include <math.h>
int main (void)
{
float diameter, area, radius, circumference, choice;
{
printf("CIRCLE CIRCUMFERENCE/AREA FINDER\n");
printf("------------------------------------\n \n");
printf("Area or Circumference??? 1=cricumference, 2= area\n \n \t - ");
scanf("%f", &choice);
}
if (choice == (float)1);
{
printf("What is the diameter of the circle?\n \n \t - ");
scanf("%f", &diameter);
circumference = diameter * 3.14;
printf("\n \t- %f", circumference);
}
else
{
printf("What is the radius of the circle???\n \n \t - ");
scanf("%f", &radius);
area = (radius * radius) * 3.14;
printf("\n \n \t \t = %f", area);
}
scanf("%c");
return 0;
}

You have to convert one into a float number.

matthew102000

»» models

Re: Do you want to learn to program in C   posted: 08-Apr-07 16:14   »» 
now it is saying that it needs a } on the...

" what is the radius of the circle ",

line. please help. i have no idea where to put it.

Thanks.

matt wuz here

cactus2

»» models

Re: Do you want to learn to program in C   posted: 08-Apr-07 16:52   »» 
#include <stdio.h>
#include <math.h>
int main (void)
{
float diameter, area, radius, circumference, choice;
printf("CIRCLE CIRCUMFERENCE/AREA FINDER\n");
printf("------------------------------------\n \n");
printf("Area or Circumference??? 1=cricumference, 2= area\n \n \t - ");
scanf("%f", &choice);
if (choice == (float)1);
{
printf("What is the diameter of the circle?\n \n \t - ");
scanf("%f", &diameter);
circumference = diameter * 3.14;
printf("\n \t- %f", circumference);
}
else
{
printf("What is the radius of the circle???\n \n \t - ");
scanf("%f", &radius);
area = (radius * radius) * 3.14;
printf("\n \n \t \t = %f", area);
}
scanf("%c");
return 0;
}

Not sure if that fixed it or not. It should.



This topic has 357 replies on 24 pages [ « | 1 ... 7 8 9 10 11 12 13 14 15 ... 24  | » ]


»» previous topic   »» next topic  

»» back to topic list  »» top of the page  

PLEASE READ THE FORUM GUIDELINES AND ALWAYS PREVIEW TO CHECK MESSAGES BEFORE POSTING...
...Help keep our forums creative and constructive. Thank you.


»» forum home