Answer:
The C# code is given below
Explanation:
using System;
public class SwimmingWaterTemperatur
{
public static void Main()
{
while(true){
Console.Write("\nPlease enter the water temperature : ");
int x = Int32.Parse (Console.ReadLine());
try{
if(CheckComfort(x)){
Console.Write(x+" degrees is comfortable for swimming.");
}else{
Console.Write(x+" degrees is not comfortable for swimming.");
}
}catch(Exception ex){
Console.WriteLine(ex);
}
}
}
public static Boolean CheckComfort(int temp){
if(temp>=70 && temp<=85){
return true;
}else if(temp>=32 && temp<=212){
return false;
}else{
throw new ArgumentException("Value does not fall within the exptected range.");
}
}
}