This content originally appeared on DEV Community and was authored by pks_021127
using System;
namespace Study
{
internal class Program
{
static void Main()
{
Console.Write("Enter NumA: ");
int numA = int.Parse(Console.ReadLine());
Console.Write("Enter NumB: ");
int numB = int.Parse(Console.ReadLine());
Console.Write("Enter numC: ");
int numC = int.Parse(Console.ReadLine());
int total = numA + numB + numC;
int count = 3;
double average = (double)total / count;
if (average == 20)
{
Console.WriteLine("average == 20");
}
else if (average > 20)
{
Console.WriteLine("average > 20");
}
else
{
Console.WriteLine("average < 20");
}
Console.WriteLine("average: " + average);
}
}
}
This content originally appeared on DEV Community and was authored by pks_021127
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.

APA
MLA
pks_021127 | Sciencx (2025-08-21T03:00:00+00:00) If Statements. Retrieved from https://www.scien.cx/2025/08/21/if-statements-2/
" » If Statements." pks_021127 | Sciencx - Thursday August 21, 2025, https://www.scien.cx/2025/08/21/if-statements-2/
HARVARDpks_021127 | Sciencx Thursday August 21, 2025 » If Statements., viewed ,<https://www.scien.cx/2025/08/21/if-statements-2/>
VANCOUVERpks_021127 | Sciencx - » If Statements. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/21/if-statements-2/
CHICAGO" » If Statements." pks_021127 | Sciencx - Accessed . https://www.scien.cx/2025/08/21/if-statements-2/
IEEE" » If Statements." pks_021127 | Sciencx [Online]. Available: https://www.scien.cx/2025/08/21/if-statements-2/. [Accessed: ]
rf:citation » If Statements | pks_021127 | Sciencx | https://www.scien.cx/2025/08/21/if-statements-2/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.