Search:

Type: Posts; User: Navar

Search: Search took 0.00 seconds.

  1. Thread: Error Checking

    by Navar
    Replies
    10
    Views
    1,911

    int menuChoice; do { printf...

    int menuChoice;

    do
    {
    printf ("Please enter a number from the menu.\n");
    printf ("1. Inches to centimeters\n");
    printf ("2. Feet to meters\n");
    printf ("3. Miles to...
  2. stick #include system("pause");...

    stick


    #include <stdlib.h>
    system("pause");

    into the code...that'd be my guess...your window is disappearing too quickly to see the result.
  3. Replies
    1
    Views
    2,426

    A few programs in C

    You all helped me write these so, here they are:


    // ASCII Converter
    #include <stdio.h>
    #include <stdlib.h>

    main()
    {
    char c, i = 'y';
  4. Replies
    5
    Views
    40,537

    assuming you're using a Dos based system...

    assuming you're using a Dos based system w/commmand prompt



    system("color [attr]");


    COLOR [attr]

    attr Specifies color attribute of console output
  5. Replies
    10
    Views
    12,988

    I did get it to print specific number or decimals...

    I did get it to print specific number or decimals using %.nf...

    %g does exactly what I want -

    double sq = 0, bb = 0, ac4 = 0, z = 0;

    sq = sqrt(bb - ac4);
    z = -0.5*(b + sq);
    x1 = z / a;...
  6. Replies
    5
    Views
    1,399

    short answer: return 0; ends the function

    short answer: return 0; ends the function
  7. This is the book I use in Comp Solutions, part of...

    This is the book I use in Comp Solutions, part of EE program at UTA...
    good book

    Borlind is a decient compiler, one of the industry leaders.
  8. Replies
    10
    Views
    12,988

    My appoligies

    double sq = 0, bb = 0, ac4 = 0, z = 0;
    double sq2 = 0, x1 = 0, x2 = 0;
    printf("%f+%fi, %f-%fi.\n\n", x1, sq, x1, sq);


    However, the %d was also producing the same result.
    Probly my...
  9. Replies
    10
    Views
    12,988

    display double w/o trailing zeros?

    I'm trying to display a list of doubles with out the trailing zeros.
    This snipet is just the declaration and printf...the actual code is fine
    I just need to modify these intergers for the printf
    ...
  10. If you want a free compiler that does a decient...

    If you want a free compiler that does a decient job...and 1999 compliant - Dev-C is freeware.
Results 1 to 10 of 11