answersLogoWhite

0


Best Answer

echo "Enter a value: "

read a

echo "Enter a value: "

read b

echo "Enter a value: "

read c

x1= echo "scale=7; (-$b+sqrt($b^2-4*$a*$c))/(2*$a)"|bc'

x2= echo "scale=7; (-$b-sqrt($b^2-4*$a*$c))/(2*$a)"|bc'

echo $x1

echo $x2

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Unix shell program to find the roots of a quadratic equation?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Geometry

Write a Shell program to find the area and circumference of a circle?

echo "Enter the Number" read n r=`expr $n % 2` if [ $r -eq 0 ] then echo "$n is Even number" else echo "$n is Odd number" fi


How many lines of symmetry does an open scallop shell have?

1


How many people could live on the surface of a Dyson sphere?

A "Dyson Sphere" is not really a sphere at all, but a dense network of solar energy collection devices orbiting around a star, effectively collecting all (or most of) the energy emitted from the star. There is no common "surface" for this network. But even if you were talking about the "surfaces" of each of the millions (billions) of satellites, none of them would have an atmosphere, and therefore, no one could live on those surfaces. I suspect you're actually talking about a "Dyson Shell", which is a shell of solid matter around a star. Note that this is not an invention of Freeman Dyson, but of science fiction writers. Freeman Dyson himself, when answering letters from people who misunderstood his idea as a Dyson Shell, stated flatly that a Dyson Shell was physically impossible. I won't go so far as to say that a Dyson Shell is physically impossible. However, there are serious impediments that are not likely to be overcome. First and foremost, there's not enough matter in the solar system to create a Dyson Shell, at 1AU distance from the sun, of sufficient thickness. Using all the "easily usable building material" in the solar system, a shell of only 8-20 cm thick could be constructed. That is not nearly thick enough to withstand impacts from interstellar bodies. Moreover, even if such a shell could be constructed, the inner surface of that shell would exert virtually no gravity on objects inside the sphere, and thus anything placed inside the sphere would fall into the star. That includes gases, so there wouldn't be any atmosphere around the inner surface of the shell. And speaking of gravity, it's doubtful that the 8-20-cm-thick shell could withstand that kind of gravity. Even if all of this could somehow be overcome, there is nothing to keep the shell in position with respect to the star, nor the star in position with respect to the shell. They would just drift around with respect to each other until the star hit the surface and punched through. Of course, anyone living on that inner surface would die from either extreme heat or extreme cold long before the breakthrough. Then there's the issue of feeding the population of the Dyson Shell. Remember, we used up all the solid material in the solar system just to build a rigid shell. Where are we going to get the soil to plant crops in? But, assuming all of these obstacles could somehow be overcome, the inside surface of a Dyson Shell would have an area of about 550 million times the surface area of Earth. So, however many people could live on the surface of the Earth, multiply that by 550 million.


What does gs stamped on a necklace mean?

Most likely it is Gold shell (gold plated) But it could be a jewelers mark.


What do you mean by internal radius?

It's the radius of a circle or sphere WITH A SHELL(or Thickness); like if an Lid on a jar had a diameter of 11mm across on the outside (top of lid); and was ONE mm thick, then the inside radius would be 5. ie; 11mm outer diameter, minus (-) 1mm thickness (aka; or shell) equals (=) 10mm (inner) diameter; which is a 5mm radius.

Related questions

What is the difference between interactive use of shell command and running a shell?

In an interactive shell session the shell program waits for the user to type in a command. When receiving a command the shell program will then attempt to locate it and process (execute) the command. You are interacting with the shell. Running a shell file requires a pre-stored series of commands stored in a file. Unless the shell program you are running is interactive then the shell executes each command in sequence, without involving the user at all.


What is Shell in shell?

The 'shell' is a user interface program that interfaces between a user of the system and the Operating System. It is the user interface.


How do you create a shell in unix?

If you are asking about a shell script, just create a text file with the commands you want to execute inside it. Then, make the file executable and readable and you have a shell script file. A shell program is more complicated; you need to support the user features that most users would expect a shell program or shell interpreter to do. I would suggest studying the source code of a current shell program to see how to go about implementing one of your own.


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


How do you run a Unix program?

By typing its name into the shell


How do you print the current directory in shell program?

pwd


Can a shell be added to unix?

Certainly (yes). A shell is just a user interface program and any user can create their own if they are so inclined. If other users wish to use this new shell program (particularly as a login shell) it can be added to the /etc/shells list.


What is a mini shell program used for in Unix?

The mini shell program is used in Unix as a programming software. It is a redirected and streamlined approach at creating variables, commands, and tokens.


What is a shell program?

A shell program is a program that runs from the computer's command line. Although they were more common in older programs, some people still use them, as the are generally faster and and more minimalist than their graphical counterparts.


What is shell in os?

The 'shell' is a user interface program that interfaces between a user of the system and the Operating System. It is the user interface.


Shell program for calculating compound interest using for loop?

yes


What is the Difference between c and shell program execution?

The shell interprets the script, while the C-compiler generates a binary executable.