User Profile

Collapse

Profile Sidebar

Collapse
punkybrewster
punkybrewster
Last Activity: Nov 8 '06, 07:54 PM
Joined: Oct 28 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • punkybrewster
    replied to Creating A Chessboard Program in C++
    in C
    Thank you so much for your response. I will try and run the program again tonight to see what happen and let you know.
    See more | Go to post

    Leave a comment:


  • punkybrewster
    started a topic Creating A Chessboard Program in C++
    in C

    Creating A Chessboard Program in C++

    I have the idea to create the program but I need help in finishing it. My task is to write a program that prints out a chessboard using only asterisks. I have to use multiple nested loops with nested conditional statements inside. The output should look like a chessboard as follows: The pattern is not coming out as I want but I guess y'all know what a chessboard look like

    * * * * *
    * * * * *
    * * * * *...
    See more | Go to post

  • punkybrewster
    started a topic Salary program
    in C

    Salary program

    Basically my task is to write a program that computes and displays the weekly salaries of a company's salespeople based upon information entered by the user and that also displays the total for the week. Use a loop prompt the user to enter the gross sales in dollars and cents for each salesperson and use -1 to quit ... read in the entered value and display the salary for that salesperson immediately then go on to the next salesperson.
    ...
    See more | Go to post

  • punkybrewster
    replied to Help with a program that makes a square
    in C
    I got you solution but it doesn't give me the results when 1.75 is raised to the -2 to be equal 0.326531....
    See more | Go to post

    Leave a comment:


  • punkybrewster
    replied to Help with a program that makes a square
    in C
    Thank you so much. It work for all scenario. You could you help me with another situation. I have to write a program that computes and displays a user-supplied base number (which can be fractional) raised to a user-supplied integer exponent (which can be positive, negative or zero. This should be the result example:

    Enter a base number: 1.75
    Enter a non-negative integer exponent: -2
    1.75 raised to the power -2 =...
    See more | Go to post

    Leave a comment:


  • punkybrewster
    replied to Need help with a program I am writing
    in C
    LOL.

    Well I tried running your program but it is not taking the value of the exponent to be negative since the if statement you wrote said:

    if (y<0)
    y = -y;

    It is turning the exponent into a positive integer. I don't know if you are testing it first before you send me your explanation but I must say it is bring me closer to my result.

    Whatever number is inputed as base raised...
    See more | Go to post

    Leave a comment:


  • punkybrewster
    started a topic Help with a program that makes a square
    in C

    Help with a program that makes a square

    My task is to write a program that reads in from the user the size of the sides of a square and prints a hollow square of that size in asterisks and spaces. A nested loop should be done. An example of the loop should look like the following:

    Enter the size of a square: 5

    * * * * *
    * *
    * *
    * *
    * * * * *

    No matter what number the user input the program...
    See more | Go to post

  • punkybrewster
    replied to Need help with a program I am writing
    in C
    To be quite honest with you I can't see what I am doing wrong. Based on my understanding of the program if I enter base as 1.75 and the exponent as -2 the program should be able to compute the result by putting the answer as 1/base. I thought in the body of the while loop I would have to use an if statement but that didn't work either. Currently I don't have a professor who devotes time to teach the course work since our class is only for 50 minutes...
    See more | Go to post

    Leave a comment:


  • punkybrewster
    replied to Need help with a program I am writing
    in C
    Thank you so much for your help and time. I got the program to run but when I enter a negative number for the exponent it didn't give me the correct value. My task is to ensure that whatever value is entered for the exponent can be zero, positive or negative....
    See more | Go to post

    Leave a comment:


  • punkybrewster
    replied to Need help with a program I am writing
    in C
    This is my first lesson in c++ and I don't have a professor to teach me throughly so I am basically winging it. I must write the program only with the header file <iostream> nothing else. Also I should only use the while loop and take into consideration positive, negative values for the exponent.


    I must say thanking you for responding and for your help. Do you have any other suggestion as to how to do this exercise...
    See more | Go to post

    Leave a comment:


  • punkybrewster
    started a topic Need help with a program I am writing
    in C

    Need help with a program I am writing

    I need to write a program that will compute a number (base) raised to a power which can be an integer, negative or zero with out including the math library. This is what I wrote thus far. Please help me.

    #include <iostream>
    using namespace std;

    int main()
    {
    double x, y;

    cout << "Enter a base number: ";
    cin >> x;
    cout <<...
    See more | Go to post
No activity results to display
Show More
Working...