Computer Science, asked by eeman173, 8 days ago

1.1 Make a program in C ++ that tells the form of Water whether it is
Ice, Water or Steam. Display the menu also as under using ternary
operator.
Temperature Less than 0 =ICE
Temperature Greater than 0 & Less than 100 = Water Temperature
Greater than 100 =STEAM​

Answers

Answered by madiha3534
1

Answer:

#include <stdlib.h>

#include <iostream>

#include <stdio.h>

#include <cstdlib>

using namespace std;

int main()

{

float temp;

cout<<"Enter the temperature"<<endl;

cin>>temp;

if (temp < 0) cout<<"ICE"<<endl;

else

if (temp >= 0 && temp <= 100) cout<<"WATER"<<endl;

else

cout<<"STEAM"<<endl;

system("pause");

return 0;

}

Similar questions