Thread: Few C programs to answer, Need help

  1. #1
    Registered User
    Join Date
    Aug 2015
    Posts
    1

    Few C programs to answer, Need help

    Hello. I am in need of help. I don't understand fully on how to use modules and conditional statements in these types of situations.
    Honestly, I would really appreciate for the help.

    Programming - Conditional Statements

    -Develop the algorithmic model to computer instructions according to coding conventions.
    -Create a computer program to solve basic programming problems with applications on structured programming language with the coding conventions.
    -Apple Module/Modulo.

    1. Determine a student's final grade and indicate whether it is passing or failing. The final grade is calculated as the average of four marks (between 0 and 100). Passing grade of 50.

    2. The ABC manufacturing company plans to give a year-end bonus to each of its employees. The program will compute the bonus of an employee considering the following criteria: If the employee's monthly salary is less than 1,000, the bonus is 50% if the salary. IF the salary is greater than 1,000, the bonus is 1,000. Print out the name and corresponding bonus of the employee.

    3. Find the largest among three different numbers entered by the user.

    4. Determine whether the letter entered by the user is vowel or consonant.

    5. Determine the quadrant, given a user-input angle. It mus read and validate the angle. Note: If the angle is exactly 0 degrees, it is not in a quadrant but lies on the positive x-axis; If the angle is exactly 90 degrees, it lies on the positive y-axis; If the angle is exactly 180 degress, it lies on the negative x-axis, and if the angle is exactly 270 degrees, it lies on the negative y-axis.

    6. Calculates the change due a costumer by denomination; that is, how many 20s, 10s, 5s, 1s and 0.25s are need in change. The input is to be the purchase price and the size of the bill tendered by the customer (PHP1000, PHP500, PHP100, PHP50, and PHP20).

    7. Compute the real roots of a quadratic equation ax2+bx+c=0. The roots can be calculated using the following formulas: x=-b±b2-4ac2a. It will prompt the user to enter the constants (a, b, c) and display roots based on the following rules:
    -If both a and b are zero, there is no solution
    -If a is zero, there is no solution
    -If the discriminate (b2-4ac) is negative, there are no real roots
    -For all other combinations, there are two roots

    Thank You!

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Welcome to the forum. If you haven't already done so, please be sure to read the homework policy. Instead of posting your entire assignment without any code, you need to post your attempt (be sure to use code tags) along with specific questions about the problems you're having.

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    Excellent! Another one....

    ~H
    Life is like riding a bicycle. To keep your balance you must keep moving - Einstein

  4. #4
    Codus Conjectus spongefreddie's Avatar
    Join Date
    Sep 2010
    Location
    USA
    Posts
    86
    Quote Originally Posted by aimdpl View Post

    -Develop the algorithmic model to computer instructions according to coding conventions.
    -Create a computer program to solve basic programming problems with applications on structured programming language with the coding conventions.
    -Apple Module/Modulo.
    What textbook/course produced these kinds of arcane directions?
    V8 Interceptor: KDE 5.25.5 on Manjaro Linux 22.0.0 "Sikaris"
    Steering wheel: gcc 12.2.0 in Kate
    Supercharger: NASM 2.15.05
    Engine: AMD Ryzen 7 1700
    Dashboard: NVIDIA GeForce GTX 1060 6GB
    Rusty old trailer for hauling 3% of my Steam catalog: Windows 7 Pro 64bit SP1
    3 Antique Ford Model T automobiles for vintage LAN gaming: Windows XP SP3
    Sturdy buckboard for DOS LAN gaming: DOSBox 0.74-3 on Windows XP SP3

  5. #5
    Registered User
    Join Date
    May 2012
    Location
    Arizona, USA
    Posts
    948
    Quote Originally Posted by spongefreddie View Post
    What textbook/course produced these kinds of arcane directions?
    If I had to guess I'd say it was translated from another language.

  6. #6
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    -If both a and b are zero, there is no solution
    -If a is zero, there is no solution
    Should it NOT be?
    -If both a and b are zero, there is no solution
    -If a is zero, there is one solution
    -If b is zero, there is one solution
    Edit2: I remember there being a one solution case; but, forget when it happens for sure.

    Tim S.
    Last edited by stahta01; 08-18-2015 at 10:06 AM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 08-13-2012, 03:19 AM
  2. Help with comparing answer to math problem and user's answer
    By Jake Garbelotti in forum C Programming
    Replies: 6
    Last Post: 07-20-2012, 10:12 PM
  3. Replies: 1
    Last Post: 11-09-2009, 07:03 AM
  4. No one has been able to answer this yet!!
    By squadeek in forum C Programming
    Replies: 10
    Last Post: 06-15-2006, 01:17 AM
  5. Programs opening programs
    By LinuxPLC in forum C Programming
    Replies: 1
    Last Post: 11-21-2002, 12:50 PM

Tags for this Thread