Question:

C++ codes? Help!?Creating a program? This is our project!?

by  |  earlier

0 LIKES UnLike

1. Enter temperature: 100

100 degrees Celsius is equivalent to:

212 degrees Fehrenheit

373 degrees Kelvin

2.Enter a number: 7

Enter another number: 9

Sume=16

Difference= -2

Product=63

Average=8

3.Enter a number: 15

15 is not divisible by 2

15 is divisible by 3

15 is divisible by 5

 Tags:

   Report

3 ANSWERS


  1. It`s pretty asy I think but I don`t know the C++ syntax,tell me if u want the pseu code or C# code.


  2. include<iostream>

    using namespace std;

    void con();

    void math();

    void div();

    int m;

    int main()

    {

    do{

    cout<<"Please have one choice.\n"

          <<"1.To convert the temprature\n"

          <<"2.To perform mathmetics\n"

          <<"3.To find divisibility.";cin>>m;}while(m<1||m>3);

    switch(m){

    case 1:

    con(); break;

    case 2:

    math(); break;

    case 3:

    div();}

    return 0;

    }

    void con()

    {

    cout<<"Please enter the Temperature ";cin>>m;

    cout<<m<<" Degree is equivalent to :\n"

          <<1.8*m+32<<" Degree Ferenheit\n"

         <<m+273<<" Degree Kelvin";

    }

    void math()

    {

    int b;

    cout<<"Enter two numbers ";cin>>m>>b;

    cout<<"Sum "<<m+b<<"\n"

          <<"Difference "<<m-b<<"\n"

          <<"Average "<<(m+b)/2;

    }

    void div()

    {

    cout<<"Enter a number ";cin>>m;

    if(m%2)cout<<m<<" is divisible by 2\n";

    else cout<<m<<" is not divisible by 2\n";

    if(m%3)cout<<m<<" is divisible by 3\n";

    else cout<<m<<" is not divisible by 3\n";

    if(m%5)cout<<m<<" is divisible by 5\n";

    else cout<<m<<" is not divisible by 5";

    }//Made by Nishant

      

  3. What are you talking about?

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.