Saturday, 24 March 2012

Introduction to Simple Ciruits

hello friends!
how are you ? i hope fine 
well now today i will tell you about some basic circuits such as
  • open circuit
  • short circuit
  • series circuit
  • parallel circuits
these are the basic introductory circuits which you need to know about these circuits first and then you will be able to construct or understand the higher circuits. in these circuits only the electron flow direction which is very simple. 
now i will tell you about the

open circuit

                         As the name suggest that open circuit have such a circuit which have opened. in other words we have to say that they have opened and can not complete the path of electron to flow. now i will show in the diagram below 



you will see that we make a circuit in which we connect the switch battery and a resistor when the switch is open no current flow through it because the switch disconnect the path of flow of electron. and the electron is static and voltage drop across the circuit is zero. you will see in the diagram 




yeah you will see that the voltage drop across the resistor is zero. because no current flow into it.



short circuit
                                   when we closed the switch the path of electrons is complete and current is flow through it you will see what happen when we short the circuit use only switch and battery




you have seen that when we short the circuits without connecting the resistance battery and switch is burnt because electron flow speed is very high and we have not controlled the electrons speed.
this is the reason when we short the two wires(positive wire and negative wire). the electron burn the battery(source) due to its high speed. that's why we are not short the negative and positive wire.

series circuit
                          In the series circuit we see that all the electrons flow in series it is not divide. In other words we say that we have a pipe and water (electrons) are flow through it. the force to move the water (voltage) is divide in the series circuit. now you have seen that electrons remain the same and voltage is divide into the series circuit. the below diagram clear your concepts of series circuit.



you will see that we have 9 volt battery source and we connected bulb and resistor the voltage drop across the resistor is 4.5 and voltage drop across the bulb is 4.5. current flowing through it is 0.45 ampere. you will see in series ciruit current is not divided but the voltages across the bulb and resistor is divided. 

Parallel Circuit
                                      In the parallel circuit the current is divide and voltages remain the same. for concepts in the parallel circuits we have a pipe which is subdivided and water have multiple paths to flow through it.
the force called voltage remains the same in parallel circuits but the current is divided you will see in the simulation diagrams



You will see that in parallel circuits first the current is 1.80 amperes after division current is 0.90 amperes on both sides but the voltages across the two paths remain the same 

 after reading this article we will come on a point that in series circuits current is same and voltage divides and in parallel circuits voltage remains the same and current divides.


hope you will like my article. if you have any confusion regarding this article please comment. 

Thank you  for reading my article

Friday, 23 March 2012

Importance Of Resistance

                              As you know resistance is the oppostion of charge. Now my question is why we use the resistance ?
What happen when we not use the resistance ?
These are the question i will tell you in this article. Now i am talking in ideal condition when we have a source(ac or dc) such as battery for dc are connected both terminals with wire having zero resistance. then are short circuited and the battery will be burn. you think why you believe in my words. yeah are not believe on me but beleive on the simulation you will find out the results like this.




you will see that when wires are connected to battery having no resistance unlimited amount of electrons flow through it and they have blast and battery is finished.
now i will show you when we connected the resistor what is the behaviour of the circuit. Lets see




aaahhh you have been seen that the battery source is not blast afer connecting the resistor electrons move smothly and and control the speed of electrons.
AS i will tell you that the current flow is like water flow as water flow easier path in which no resistor accur in the same way current/electron follow the path in which no resistance found when we connected the two path such that one path have a resistor and another have not. then what is the behaviour of current. and how it effect on battery see it in the diagram below





ooohhh you will see electrons follow the easier path and have shorted. the battery connected to it is burnt. hope you will understand what i want to say my article that resis is very important to control the current and voltages in my future post i will tell you current divider voltage divider but now you will see that when we connect resistor in both paths then what happen to it.






you will again see when we connected some resistance in the path of electron they force called voltage drop across the resistors and there is no effect in batery the battery is smoothly discharge.
i hope you understand my article if you have any problem related this article the please comment i will reply back to you as early as possible.
thank for reading my article ......



What is a breadboard?


A breadboard is used to build and test circuits quickly before finalizing any circuit design. The breadboard has many holes into which circuit components like ICs and resistors can be inserted. A typical breadboard is shown below:




The bread board has strips of metal which run underneath the board and connect the holes on the top of the board. The metal strips are laid out as shown below. Note that the top and bottom rows of holes are connected horizontally while the remaining holes are connected vertically.





To use the bread board, the legs of components are placed in the holes. Each set of holes connected by a metal strip underneath forms a
node. A node is a point in a circuit where two components are connected. Connections between different components are formed by putting their legs in a common node.The long top and bottom row of holes are usually used for power supply connections. The
rest of the circuit is built by placing components and connecting them together with jumper wires. ICs are placed in the middle of the board so that half of the legs are on one side of the middle line and half on the other. A completed circuit might look like the following.

 

Breadboarding tips:

                                        It is important to breadboard a circuit neatly and systematically, so that one can debug it and get it running easily and quickly. It also helps when someone else needs to understand and inspect the circuit. Here are some tips:

1. Always use the side-lines for power supply connections. Power the chips from the side-lines and not directly from the power supply.

2. Use black wires for ground connections (0V), and red for other power connections.

3. Keep the jumper wires on the board flat, so that the board does not look cluttered.

4. Route jumper wires around the chips and not over the chips. This makes changing the chips when needed easier.

5. You could trim the legs of components like resistors, transistors and LEDs, so that

they fit in snugly and do not get pulled out by accident.

Thursday, 22 March 2012

Basics of measuring resistance


                                                                        When measuring resistance, all musltimeters use exactly the same principle whether they are analogue multimeters or digital multimeters. In fact other forms of test equipment that measure resistance also use the same basic principle.
The basic idea is that the multimeter places a voltage at the two probes and this will cause a current to flow in the item for which the resistance is being measured. By measuring the resistance it is possible to determine the resistance between the two probes of the multimeter, or other item of test equipment.
It is very simple to measure the resistance of any resistor. you just connect the probes with the resistors in this way that the resistor is placed between the probes and take the reading. we have to measure the resistance with two kind of meters like analogue meter or digital multimeters.

For example if you wanna determine the resistance of wire you will connect the two probes with wire as shown in the diagram and the meter give the resistance of wire this very simple example to measure the resistance of conductor/resistor.
i hope you will have a rough idea about the measuring the values of resistance
thank you for reading my article bye

Sunday, 18 March 2012

NASA-NSF Scientific Balloon Launches from Antarctica


NASA and the National Science Foundation launched Monday a scientific balloon to study the effects of cosmic rays on Earth. The launch is one of five scientific balloons scheduled to launch from Antarctica in December.
View Larger Image


WASHINGTON -- NASA and the National Science Foundation launched Monday a scientific balloon to study the effects of cosmic rays on Earth. The launch is one of five scientific balloons scheduled to launch from Antarctica in December.

The Cosmic Ray Energetics And Mass (CREAM) experiment was designed and built at the University of Maryland. CREAM will investigate high energy cosmic-ray particles that originated from distant supernovae explosions in the Milky Way and arrived to Earth.

Two hand-launched space science payloads are next in the balloon schedule. They will carry the Balloon Array for Radiation-belt Relativistic Electron Losses (BARREL) experiment designed and constructed at Dartmouth College. BARREL will provide answers on how and where Earth's Van Allen radiation belts -- which produce the polar aurora -- periodically drain into Earth's upper atmosphere. These test flights will help scientists prepare for similar flight experiments scheduled for launch in 2013 and 2014.

Next in the queue will be a experiment from the University of Pennsylvania in Philadelphia called Balloon Borne Aperture Submillimeter Telescope (BLAST).This will investigate how magnetic fields impede star formation in our galaxy. BLAST’s instrumentation and telescope will collect data to make the first high-resolution images of magnetically polarized dust in a number of nearby star forming regions.

A super pressure balloon test flight also will be conducted. The 14-million-cubic-foot NASA balloon is the largest single-cell, fully-sealed, super-pressure structure ever flown. It is twice the size of a similar balloon flown 54 days from December 2008 to February 2009. NASA’s goal is to eventually develop a 26-million cubic-foot super-pressure balloon, nearly the size of a football stadium.

NASA scientific balloons are composed of a lightweight polyethylene film, similar to sandwich wrap. Flying to altitudes of nearly 25 miles, many of the balloons inflate to almost the size of a football stadium and carry payloads weighing up to 6,000 pounds.

During part of each Antarctic summer, from December to February, NASA and the National Science Foundation conduct a scientific balloon campaign. Two unique geophysical conditions above Antarctica make long-duration balloon flights circumnavigating the continent possible during the three-month period.

A nearly circular pattern of gentle east-to-west winds that lasts for a few weeks allows the recovery of a balloon from roughly the same geographic location and permits a flight path that is almost entirely above land. Balloons are illuminated continuously because the sun never sets during the Antarctic summer. Balloons maintain a constant temperature and altitude, thereby increasing and stabilizing observation times. By contrast, in other areas of the world, daily heating and cooling cycles change the volume of gas in the balloon and cause it to rise and fall, which severely limits fly times.

NASA’s Wallops Flight Facility in Virginia manages the scientific balloon program for the agency's Science Mission Directorate in Washington. Under NASA safety supervision, the launch operations are conducted by the Columbia Scientific Balloon Facility in Palestine, Texas, which is managed by the Physical Science Laboratory of New Mexico State University in Las Cruces. The National Science Foundation manages the U.S. Antarctic Program and provides logistic support for all U.S. scientific operations in Antarctica.

To monitor the real time flight tracks of the balloons, visit:
http://www.csbf.nasa.gov/antarctica/ice1011.htm

For more information on NASA’s scientific balloon program, visit: http://sites.wff.nasa.gov/code820


Radiation Belt Storm Probes (RBSP)

Artist's rendering showing two spacecraft representing the not-yet-designed Radiation Belt Storm Probes The Radiation Belt Storm Probes mission is part of NASA’s Living With a Star Geospace program to explore fundamental processes that operate throughout the solar system, in particular those that generate hazardous space weather effects near the Earth and phenomena that could affect solar system exploration.

RBSP is being designed to help us understand the sun’s influence on the Earth and near-Earth space by studying the planet’s radiation belts on various scales of space and time.

Understanding the radiation belt environment and its variability has extremely important practical applications in the areas of spacecraft operations, spacecraft and spacecraft system design, mission planning, and astronaut safety.

The mission’s science objectives are to:



  • Discover which processes, singly or in combination, accelerate and transport radiation belt electrons and ions and under what conditions.




  • Understand and quantify the loss of radiation belt electrons and determine the balance between competing acceleration and loss processes.




  • Understand how the radiation belts change in the context of geomagnetic storms.
    The instruments on the two RBSP spacecraft will provide the measurements needed to characterize and quantify the processes that produce relativistic ions and electrons. They will measure the properties of charged particles that comprise the Earth’s radiation belts and the plasma waves that interact with them, the large-scale electric fields that transport them, and the magnetic field that guides them.

    For more information:
    RBSP website
    Review Status: The RBSP mission has successfully completed their Preliminary Design Review (PDR), Critical Design Review (CDR) and System Integration Review (SIR) reviews. The Project is expected to come in on cost and schedule. The Operational Readiness Review (ORR) is scheduled for February 2012 and the Launch is schedule for May 2012 (updated 1/21/11).





  • Review Manager:
    Cynthia Bruno




  • Launching Balloons in Antarctica

    Robyn Millan arrived in Antarctica on Nov. 19, 2010 to launch test balloons for the BARREL project.
    Robyn Millan arrived in
     Antarctica on Nov. 19, 2010
     to launch test balloons for
     the BARRELproject.
     Credit: Henry Cathey
    They nicknamed it the "Little Balloon That Could." Launched in December of 2010 from McMurdo Station in Antarctica, the research balloon was a test run and it bobbed lower every day like it had some kind of leak. But every day for five days it rose back up in the sky to some 112,000 feet in the air.

                
    Down on Earth, physicist Robyn Millan was cheering it on, hoping the test launch would bode well for the success of her grand idea: launches in 2013 and 2014 of 20 such balloons to float in the circular wind patterns above the South Pole. Each balloon will help track electrons from space that get swept up in Earth's magnetic field and slide down into our atmosphere. Such electrons are an integral part of the turbulent magnetic space weather system that extends from the sun to Earth.

    A professor at Dartmouth College, Millan is the principal investigator for a project called BARREL, or Balloon Array for RBSP Relativistic Electron Losses. Millan's proposal will work hand in hand with NASA's Radiation Belt Space Probes (RBSP) mission, two NASA spacecraft due to launch in 2012 to study a mysterious part of Earth's magnetic environs called the Van Allen radiation belts. The radiation belts are made up of two regions, each one a gigantic donut of protons and electrons that surrounds Earth.

    "We're both looking at the loss of particles from the radiation belts," says Millan. "RBSP sits in space near the equatorial plane and looks at the particles along magnetic field lines there. These particles come into our atmosphere – following magnetic field lines to their base at the Poles – and produce X-rays. BARREL measures those X-rays. Together we can combine measurements of the same set of particles."

    Figuring out what causes this rain of electrons will do more than simply improve understanding of the physics behind what drives such high-energy particles. The charged particles within the radiation belts can damage sensitive electronics on spacecraft like those used for global positioning systems and communications, and can injure humans in space. (The electrons don't make it all the way to Earth, so pose no danger to those of us on the ground.) Experiments like BARREL and RBSP help us understand the processes and mitigate those risks.

    Millan began working on balloons during her graduate work at University of California, Berkeley, where she studied physics. She worked on a balloon called MAXIS that focused on electron precipitation from the magnetosphere into the ionosphere. "Then," she says, "We got this idea. They launch these huge payloads in Antarctica, but before that they send up smaller test balloons to make sure conditions are right for the big launch. And we thought – what if you could put instruments on those? So we took our payload, and miniaturized it."

    She and her team, which includes scientists and students at UC Berkeley, UC Santa Cruz, and University of Washington, set about making payloads that weigh only 50 pounds for balloons that are some 90 feet in diameter. That still sounds fairly big unless you know that the typical balloons launched in Antarctica are the size of a football field and carry payloads of some 3,000 pounds. The team received funding from the National Science Foundation to fly a total of six small balloons in 2005, and shortly thereafter she learned that NASA had put out a call for experiments to support RBSP.

    David Sibeck, the mission scientist for RBSP at Goddard Space Flight Center in Greenbelt, Md., recalls that Millan's project proposal was well-tailored to RBSP's goals. "One of RBSP's main challenges will be to differentiate between the hordes of theories that try to explain why the belts wax and wane over time," Sibeck says. "The RBSP spacecraft will be equipped to distinguish between different options, but Millan's balloons have an advantage in one specific area: they can measure particles that break out of the belts and make it all the way to Earth's atmosphere."

    The two RBSP spacecraft will help study the Van Allen Radiation belts that surround Earth.
                                                                   › View larger
    The two RBSP spacecraft will help study the Van Allen Radiation belts that surround Earth. Credit: Johns Hopkins University Applied Physics Laboratory


    The first test of BARREL -- funded by NASA and also supported by NSF's Office of Polar Programs that supports logistics of all research in Antarctica -- began in December of 2008. The final one began this past winter, when Millan left New Hampshire for Antarctica on Nov. 15. She arrived in McMurdo Station – after a transfer in Christ Church, New Zealand and a day lost due to crossing the date line – on Nov. 19. This flight needed to test travel and ease of launch capabilities as much as anything else, so Millan's team had shipped all the balloons ready to fly. Once in Antarctica, she and her colleague, Brett Anderson, a Dartmouth graduate student, got to work unpacking.

    "It was great," she says. "We just had to pull them out of the box and turn them on. We mounted their solar panels and with just two people we were able to get things ready really fast, which isn't always the easiest thing to do when in Antarctica."

    One reason to do such electron research at the Poles is that Earth's magnetic field lines touch down there. But equally important for this campaign are the slowly circling wind patterns that set up each summer. The BARREL project will release another balloon every 1-2 days and each should fall into line, consistently buoyed by the winds along the same circular path.

    This past December – which is, of course, the summer in Antarctica – it took longer than normal for those winds, known as circumpolar winds, to set up. So when the first balloon was launched – a process spearheaded by the Columbia Scientific Balloon Facility -- it floated straight North towards Tasmania. This was the balloon that came to be known as The Little Balloon That Could, says Millan: "Perhaps it had a very small hole, but it didn't quite make it as high as it was supposed to – some 120,000 feet. It only ever got to 112,000 feet, but it maintained that height doggedly and even sent back some interesting data as it flew through an X-ray aurora.” A second balloon did hit the right wind current, successfully transmitting data. (The second balloon did, however, have to be cut down a little early due to an overheated battery.)

    So now the BARREL team will begin work on preparing the real show – two campaigns of 20 balloons each that will be launched during the 2012 to 2014 time frame.

    "Her balloons will work in conjunction with RBSP," says Sibeck. "She can let us know if they're seeing particles and RBSP can look for the events that might be scattering them out of the radiation belts down to Earth." In addition, since each balloon is meant to stay aloft for 10 days, they will cover a huge area in the sky. When RBSP spots an interesting phenomenon, BARREL can give feedback over a large area as to where the particles went. The team will be able to see how big that region is and measure the total amount of particles that get kicked out of the belts – and thus determine how big of an effect different phenomena have. "That's something we would have more trouble doing with the spacecraft," says Sibeck.

    Once each balloon is launched it moves slowly by floating in the wind. Those on the ground cannot control it, other than the single command to terminate the mission. A small explosive detonates and cuts the cable to the payload, which then floats down to the ground on a parachute. This was the fate of the two test balloons in December 2010, though they were particularly sorry to cut down the Little Balloon That Could. "We really wanted to see how far it would go," says Millan. "But it was so far north that we were getting close to Australian air space and we had to cut it down."

    So the team declared the test a success, packed up their gear and began the long trip home to New Hampshire to oversee the building of 45 more payloads.


    Karen C. Fox


                        Reference

    NASA Sub-Scale Solid-Rocket Motor Tests Material for Space Launch System

    HUNTSVILLE, Ala. -- A sub-scale solid rocket motor designed to mimic NASA's Space Launch System, or SLS, booster design successfully was tested today by engineers at NASA's Marshall Space Flight Center in Huntsville, Ala. The 20-second firing tested new insulation materials on the 24-inch-diameter, 109-inch-long motor. The motor is a scaled down, low-cost replica of the solid rocket motors that will boost SLS off the launch pad.

    Marshall is leading the design and development of the SLS on behalf of the agency. The new heavy-lift launch vehicle will expand human presence beyond low-Earth orbit and enable new missions of exploration across the solar system.

    The test will help engineers develop and evaluate analytical models and skills to assess future full-scale SLS solid rocket motor tests. The next full-scale test, Qualification Motor-1 (QM-1), is targeted for spring 2013. Two five-segment solid rocket motors, the world's largest at 154-foot-long and 12-foot diameter, will be used in the first two 70-metric-ton capability flights of SLS.

    Previous ground tests of the motors included carbon insulation to protect the rocket's nozzle from the harsh environment and 5000-degree temperatures to which it is exposed. QM-1 will include a new insulation material, provided by a new vendor, to line the motor's nozzle.

    "Test firing small motors at Marshall provides a quick, affordable and effective way to evaluate the new nozzle liner's performance," said Scott Ringel, an engineer at Marshall and the design lead for this test. "We have sophisticated analytic and computer modeling tools that tell us whether the new nozzle insulation will perform well, but nothing gives us better confidence than a hot-fire test."

    The test also includes several secondary objectives. The team introduced an intentional defect in the propellant with a tool designed to create a specific flaw size. By measuring the temperature inside the motor at the flaw location, the team hopes to gain a better understanding for the propellant's margin for error. Test data also will help the team better understand acoustics and vibrations resulting from the rocket motor's plume.

    In addition, NASA's Engineering and Safety Center will use test data to measure a solid rocket motor's plume and how it reacts to certain materials.

    Engineers from Marshall's Engineering Directorate designed the test motor with support from ATK Aerospace Systems of Huntsville, Ala. ATK of Brigham City, Utah, the prime contractor for the SLS booster, is responsible for designing and testing the SLS five-segment solid rocket motor.

    For more information about SLS, visit:


     
    Michael Braukus
    Headquarters, Washington
    202-358-1979
    michael.j.braukus@nasa.gov

    Kimberly Newton
    Marshall Space Flight Center, Huntsville, Ala.
    256-544-6153
    kimberly.d.newton@nasa.gov


    March 14, 2012                              RELEASE : 12-085

    Saturday, 17 March 2012

    NASA Seeks Proposals for Green Propellant Technology Demonstrations

    NASA is seeking technology demonstration proposals for green propellant alternatives to the highly toxic fuel hydrazine. As NASA works with American companies to open a new era of access to space, the agency seeks innovative and transformative fuels that are less harmful to our environment.

                                             Hydrazine is an efficient and ubiquitous propellant that can be stored for long periods of time, but is also highly corrosive and toxic. It is used extensively on commercial and defense department satellites as well as for NASA science and exploration missions. NASA is looking for an alternative that decreases environmental hazards and pollutants, has fewer operational hazards and shortens rocket launch processing times.

                                            "High performance green propulsion has the potential to significantly change how we travel in space," said Michael Gazarik, director of NASA's Space Technology Program at the agency's headquarters in Washington. "NASA's Space Technology Program seeks out these sort of cross-cutting, innovative technologies to enable our future missions while also providing benefit to the American space industry. By reducing the hazards of handling fuel, we can reduce ground processing time and lower costs for rocket launches, allowing a greater community of researchers and technologists access to the high frontier."

                                              Beyond decreasing environmental hazards and pollutants, promising aspects of green propellants also include reduced systems complexity, fewer operational hazards, decreased launch processing times and increased propellant performance.

                                             Maturing a space technology, such as green propellants, to mission readiness through relevant environment testing and demonstration is a significant challenge from a cost, schedule and risk perspective. NASA has established the Technology Demonstration Missions Program to perform this function, bridging the gap between laboratory confirmation of a technology and its initial use on an operational mission.

                                            NASA anticipates making one or more awards in response to this solicitation, with no single award exceeding $50 million. Final awards will be made based on the strength of proposals and availability of funds. The deadline for submitting proposals is April 30.

                                             The Technology Demonstration Missions Program is managed by NASA's Marshall Space Flight Center in Huntsville, Ala. To view the announcement and instructions for submissions, visit:



    http://go.usa.gov/Qbx


    For more information about NASA's Space Technology Program and Technology Demonstration Missions, visit:



    http://www.nasa.gov/oct




    David E. Steitz, 202-358-1730
    Headquarters, Washington
    david.steitz@nasa.gov

    Kimberly Newton, 256-544-0034
    Marshall Space Flight Center, Huntsville, Ala.
    Kimberly.D.Newton@nasa.gov


    Date 02.08.2012
    Reference

    Conditions






    CONDITIONAL STATEMENTS


                               Here i will tell you how you apply the conditions in the c++ code. it is very much simple by applying the conditions you will perform your desired task. please at the code for understanding.





    WRITE A PROGRAME THAT TAKES NUMBER FROM USER AND TELLS EITHER IT IS GREATER THAN 10 OR NOT

    CODE for C++

    #include<iostream.h>  // library

    void main() // main function

    {

    int x;    // integer

    cout<<"enter number"; // for display

    cin>>x; // store data which is given by user

    if(x>10) // condition

    cout<<"number is greater than 10";

    else    // condition

    cout<<"number is smaller than or equal to 10"<<endl; // result

    }


    OUTPUT



    WRITE A PROGRAMME THAT CHECKS EITHER NUMBER IS GREATER,LESS AOR EQUAL TO 10



    CODE for C++


    #include<iostream.h>

    void main()

    {

    int x;

    cout<<"enter number";

    cin>>x;

    if(x>10)   // condition

    cout<<"number is greater than 10";

    if(x<10) // condition

    cout<<"number is less than 10";

    if(x==10) // condition

    cout<<"number is equal to 10";

    }




    OUTPUT








    MULTIPLE CONDITIONS IN IF

    WRITE A PROGRAMME THAT COMPUTES THE GRADE FOR STUDENT


    CODE for C++

    #include<iostream.h>

    void main()

    {

    int x;

    cout<<"enter MARKS";

    cin>>x;

    if(x>90)  // condition

    cout<<"grade is A+"<<endl;

    else if(x>80 && x<90)  // condition

    cout<<"grade is A"<<endl;

    else if(x>70 && x<80)  // condition

    cout<<"grade is B"<<endl;

    else if(x<50)   // condition

    cout<<"student is fail"<<endl;

    }

     




    OUTPUT







    WRITE A PROGRAMME THAT CHECK THAT EITHER THE NUMBER IS EVEN OR ODD



    CODE for C++

    #include<iostream.h>

    #include<conio.h>

    void main()

    {

    int num;

    cout<<"ENTER THE NUMBER\n";

    cin>>num;

    if(num%2==0)

    {

    cout<<"number is even"<<endl;

    }

    else

    {

    cout<<"number is odd"<<endl;

    }

    }



    OUTPUT






    WRITE A PROGRAMME FOR CALCULATOR USING ELSE IF STATEMENT



    CODE for C++

    #include<iostream.h>

    #include<conio.h>

    void main()

    {

    int a=0;

    int num1,num2;

    cout<<"enter first number\n";

    cin>>num1;

    cout<<"enter second number\n";

    cin>>num2;

    char select;

    cout<<"select the operation\n";

    do

    {

    cin >>select;

    int sum,mul,sub;

    float div;

    if(select=='+')

    {

    sum=num1+num2;

    cout<<"sum is = "<<sum;

    }



    else if(select=='-')

    {

    sub=num1-num2;

    cout<<"subtraction result is= "<<sub;

    }

    else if(select=='*')

    {

    mul=num1*num2;

    cout<<"multiplication result is ="<<mul;

    }

    else if(select=='/')

    {

    if(num2!=0)

    {

    div=num1/num2;

    cout<<"division result is = "<<div;

    }

    else

    cout<<"eneter number 2 except than 0";

    }

    else

    cout<<"eneter correct operator";

    a=1;

    }

    while(a==1);

    }






    OUTPUT




    Twitter Delicious Facebook Digg Stumbleupon Favorites More

     
    Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Review