Question about Operating Systems

1 Answer

I want a c++ program (using functions) that calculates trignometric ratios, logarithms besides addition, subtraction, multiplication, division, modulus etc.: as many comments as possible.

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 3 Answers

Using switch case statement is possible.

Posted on Jan 30, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

122 - (155 - (400 - 637) x 652)= ?


The answer is: -154557

Do the innermost parentethese and work out.

Do multiplication and division before addition and subtraction.

Steps for this are:

122 - (155 - (400 - 637) x 652)=
122-(155-(-237) X 652)
122-(155- (-154524))
122-(154679)
-154557

You can use the Windows calculator on the scientific View and come up with the same answer.

Thanks for using Fixya.

Feb 03, 2011 | Operating Systems

1 Answer

What are the heirarchy of operation?


Hi,

The following information on "Hierarchy of Operations" was taken from Pages 45-46 of the "Microsoft QuickBasic 4.0: Basic Language Reference" manual for Versions 4.00 and 4.00b. This information also applies to the following products:

  1. Microsoft GW-Basic Versions 3.20, 3.22, and 3.23
  2. QuickBasic Versions 1.00, 1.01, 1.02, 2.00, 2.01, 3.00, 4.00, 4.00b, and 4.50
  3. Microsoft Basic Compiler Versions 5.35, 5.36, 6.00, and 6.00b
  4. Microsoft Basic PDS Version 7.00.
MORE INFORMATION The Basic operators have an order of precedence, that is, when several operation... loadTOCNode(1, 'moreinformation'); The Basic operators have an order of precedence, that is, when several operations take place within the same program statement (without being grouped by parentheses), some operations are executed before others. Operations are executed in the following order:

  1. Arithmetic operations

    1. Exponential (^)
    2. Negation (-)
    3. Multiplication and division (*, /)
    4. Integer division (\)
    5. Modula arithmetic (MOD)
    6. Addition and subtraction (+, -)
  2. Relational operations (=, >, <, <>, <=, >=)
  3. Logical operations

    1. NOT
    2. AND
    3. OR
    4. XOR
    5. EQV
    6. IMP
An exception to the order of operations listed above occurs when an expression has adjacent exponentiation and negation operators. In this case, the negation is done first. For example, the following statement prints the value .0625 (equivalent to 4^-2), not -16 (equivalent to -(4^2)): PRINT 4 ^ -2 If operators on the same precedence level appear in the same expression, they are computed from left to right.

For more information on the "Hierarchy of Operations," consult the Basic language reference manual for your version of Basic. Please post your feedback and Vote if the problem resolved as per your satisfaction.

Jul 13, 2010 | Microsoft Windows XP Professional

1 Answer

How do you subtract low numbers from high numbers


  • Hi, to "Subtract a >Higher (#,$) numbers from a <Lower (#, $) numbers; you take the "bigger number 167, place that number (over the smaller number 78 and from (right to left) take away numbers. Example: 167 - 86 = Think of 167 as $167.00 and 86 as $86.00, so to make $86.00 into $167.00 you'll need a $81.00 more. So if you think about how much more money you will need to "Add" to make a certain amount, it is just the same as how much you "Don't have! You have $167.00 when you go shopping for clothes, and you spend $86.00 when you count how must money you have left, it add up to $81.00 "That's "Subtracting." "Subtract (167 from 86 you get 81). " Always remember the Higher, or Larger number goes on top! " If you want to check to see if the answer is "right," add the two number together,(86 + 81 = 167). "I hope this helped you, rating the solution is appreciated, thanks"

May 02, 2010 | School Zone Addition Subtraction Full...

1 Answer

Subtract 1.50 from 72.63


Access http://www.google.com
and enter '72.63-1.50' and press ENTER.

Google Math will give you the answer. :-)

Oct 01, 2009 | School Zone Addition Subtraction Full...

1 Answer

I need to program a calculator in vb 6


Dear here is the link that contains a sample code to your problem.

http://www.vb6.us/source-code/simple-calculator-written-vb6

Best regard

May 26, 2009 | Microsoft Windows XP Professional

1 Answer

Electricity bill coding in java


First think how you would solve this problem yourself on a piece of paper. Then try programming it using the things you learned (if they've given you this assignment without teaching you to multiply, subtract and use if's, drop the course).
Well here is an idea.

Take the total kilowattage and send it to a function. What the function will do is subtract 14KW from the total Kilowattage and add the amount for the first 14KW then subtract 85KW from the total KW and add the amount for the 85KW. But once you subtract the number of KW from the total make sure to check if the total KW isn't negative, if so just break out of the function and return the total due.

Or if you have formula for how much the rate grows over how many miles.

For example lets say the rate grows by $1 every time the KW doubles you could have something like

int rate = 1; //Begining rate
int KW = 14; //First flat rate
int amount; //total amount they have to pay
while(totalKW > 0)
{
totalKW -= KW; //subtract the first rate
if(totalKW <= 0) //check if too much subtracted
break; //if so break
amount += rate; //add the rate to the total

rate += 1; // Add $1 to the rate every time
KW *= 2; // KW is doubled
}

Jan 05, 2009 | Operating Systems

1 Answer

C program


See the Following Program

Leap Years
Def: A year is a century year if it is divisible by 100.
Def: A year is a non-century year if it is not a century year.
Def: A year is a leap year if it is a non-century year that is divisible by 4, or a century year that is divisible by 400. Nothing else is a leap year.
In a source file named leapyears.cpp, write a program that will prompt the user for the starting year and ending year for a range of years and print to the screen all leap years in that range, 5 years per line. You must write a separate function called isLeapYear that takes a year as a parameter and returns whether or not that year is a leap year. Your main function will call the isLeapYear function in a loop for every year within the range delineated by, and including, the starting and ending years.
Help with Code Tags c Syntax (Toggle Plain Text)
  1. #include <iostream>
  2. using namespace std;
  3. bool LeapYear(int y)
  4. {
  5. return ( y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0);
  6. }
  7. double isLeapYear(double x)
  8. {
  9. if( x > -10000 && x < 10000)
  10. return x;
  11. }
  12. int main()
  13. {
  14. int x;
  15. cout << "Please enter start and end of a range of years: ";
  16. cin >> x;
  17. if (isLeapYear(x))
  18. {
  19. if (LeapYear(x))
  20. cout << x;
  21. }
  22. }
--------------------------------------------------------------------------------------------------------------------------------------------------
The One More Sample Of the Program

C program to check whether a year is a leap year or not.

Code: C /*
** C program to check whether an entered year is a leap year or not
** @author: Pradeep
** @date: 02/12/06
*/


#include<stdio.h>

int main(void)
{
int year;

printf("Enter the year: ");
scanf("%d",&year);

/*
** The logic is that the year is either divisible by both
** 100 and 4 , OR its only divisible by 4 not by hundred
*/

if(year%400 ==0 || (year%100 != 0 && year%4 == 0))
{
printf("Year %d is a leap year",year);
}
else
{
printf("Year %d is not a leap year",year);
}

return 0;
}
If Not Satisfied Just put the Program name in Google and Search

Sep 10, 2008 | Operating Systems

1 Answer

Page file


Computers use the RAM of the computer to store the active programs, and perform other operating system functions. Obviously, there is a limit to how much RAM is available for this function. This is why Windows runs faster with more RAM installed.

Since Windows allows you to open multiple programs and switch between them, it is more efficient to "swap" inactive programs or parts of programs out of RAM, so a special disk files is created - "pagefile.sys".

Pagefile.sys is related to the "Virtual Memory" function of Windows.

You can see the pagefile setup by right clicking on My Computer, the go to Properties/Advanced/Performance/Advanced.

Jul 20, 2008 | Microsoft Windows Server Standard 2003 for...

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

51 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...