please help me

Reply

Join Date: Sep 2004
Posts: 4
Reputation: alexmejia92 is an unknown quantity at this point 
Solved Threads: 0
alexmejia92 alexmejia92 is offline Offline
Newbie Poster

please help me

 
0
  #1
Sep 8th, 2004
I need to write a C program

(a) declare two integer variables , and y

(b) lex x = 6

(c) find y value use the following algebraic fromula:
y=2*x*x*x+5


and I only have until these part

#include <stdio.h>
int main ()
{

int x, y;
x = 6;
y = 2*x*x*x+5;

I don't know what to put next, [lease help me with my homework

thanks
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,359
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 239
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: please help me

 
0
  #2
Sep 8th, 2004
#include <stdio.h>
  
  int main(void)
  {
     int x = 6, y = 2 * x * x * x + 5;
     printf("x = %d, y = %d\n", x, y);
     return 0;
  }
  
  /* my output
  x = 6, y = 437
  */
Man... open a book.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 759
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Solved Threads: 35
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: please help me

 
0
  #3
Sep 8th, 2004
Originally Posted by Dave Sinkula
Man... open a book.
can not stress that enough, programming is somthing you can not expect to learn without using a book, weather it be a book on programming it self, or a book with just example snipets, you will need a book and need one often. books on engineering, software design, anything you can think of related to programming are always good things to read, and you can get them at your local library for free, just check it out, read it, and return it. if you need it again, check it out again. if you find its a book that you will need often, just purchase ur own copy of it.
Dont forget to spread the reputation to those that deserve!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC