User Profile

Collapse

Profile Sidebar

Collapse
jimix
jimix
Last Activity: Mar 2 '08, 01:10 AM
Joined: Feb 1 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jimix
    replied to program to find divisors of 1-50
    in C
    o.k. I tried it several ways. I hope I can just insert a \n in the right spot to solve the problem but I can't figure out where or if it is possible.
    See more | Go to post

    Leave a comment:


  • print 1-50 as a block of 5 rows 10 columns using a function

    o.k. so i can't program and this is child's play to most of your.
    I am struggling with understanding functions. Here's what I have.#include <stdio.h>



    [CODE=c] void row (int);
    int main (void)

    {
    int x=41;
    int i;


    for (i=1; i<=x; i+=10)
    printf("%d",i);
    row (int j);

    }

    void row(int j)...
    See more | Go to post
    Last edited by Ganon11; Feb 13 '08, 10:04 PM. Reason: Please use the [CODE] tags provided.

  • jimix
    started a topic program to find divisors of 1-50
    in C

    program to find divisors of 1-50

    I have written the program for factors of #'s 1-50 but the factors print out below the number being factored. I can't figure out how to make it all on the same line.
    i.e. (now) divisors of 25 are
    1
    5
    25
    (need) divisors of 25 are 1, 5, 25.
    here is my code;
    [CODE=c]#include <stdio.h>


    int main()

    {
    int i;
    int x=50;...
    See more | Go to post
    Last edited by Ganon11; Feb 13 '08, 10:10 PM. Reason: Please use the [CODE] tags provided.

  • jimix
    replied to finding the max of a function
    in C
    yes. the instructor asks us not to use calculus rather compare values for fx and then print the maximum value. that is where I am stuck.
    See more | Go to post

    Leave a comment:


  • jimix
    started a topic finding the max of a function
    in C

    finding the max of a function

    Here is my code. the function is 500x-10x^2. i am trying to find the largest fx, call it max and print it.
    [code=c]
    #include <stdio.h>
    #include <math.h>

    int main(void)

    {int fx;
    int x=0;
    int max;
    int a=50;
    int fxnext;


    printf("f(x) x.\n");
    printf("-----\n");

    while (x<a)
    {...
    See more | Go to post
    Last edited by sicarie; Feb 3 '08, 03:57 AM. Reason: Code tags

  • jimix
    replied to is it a leap year in c++
    in C
    nevermind I figured it out. (with your help). thanks.
    See more | Go to post

    Leave a comment:


  • jimix
    replied to is it a leap year in c++
    in C
    O.k. Thanks for your help. I understand the algorithm and tried an "else" statement.(it seems simpler this way) I get one error here and don't know what I am missing. This is c not c++ and my original post had some integer mistakes.


    [CODE=c]#define _CRT_SECURE_NO_ DEPRECATE
    #include <stdio.h>

    int main( void )
    {
    int year, a, b, e;
    a = 4;
    b = 100;...
    See more | Go to post
    Last edited by Ganon11; Feb 2 '08, 03:38 AM. Reason: Please use the [CODE] tags provided.

    Leave a comment:


  • jimix
    started a topic is it a leap year in c++
    in C

    is it a leap year in c++

    here's what i have. using microsoft studio

    [CODE=c]#define _CRT_SECURE_NO_ DEPRECATE
    #include <stdio.h>

    int main( void )
    {
    int year, b, c, e;
    b = 4;
    c = 100;
    e = 400;

    /* prompt the user for a year to check */
    printf("Enter a year: ");
    scanf("%d", &year);
    /* put your code below here */...
    See more | Go to post
    Last edited by Ganon11; Feb 1 '08, 04:40 AM. Reason: Please use the [CODE] tags provided.
No activity results to display
Show More
Working...