Professional Documents
Culture Documents
Activity 2 Final
Activity 2 Final
Section: 1F6
ACTIVITY 2
Instruction: Copy your working code and paste it here. Make sure to include your name in the
code using comments.
[!!] How to use comments? By using forward slash //
Write a program that converts a temperature from Fahrenheit to Celsius and display “Boiling
point reached” if Celsius is greater than or equal to 100, otherwise display “Freezing point
reached”.
Formula: Celsius = (Fahrenheit - 32) * 5 / 9; (20 points)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks
namespace OLIVER_CAMILLE_JOY
{
class Program
{
static void Main(string[] args)
{
// OLIVER CAMILLE JOY R
// 1-F6
Console.Write("Enter a number:");
fahreinheit = int.Parse(Console.ReadLine());
celcius = (fahreinheit - 32) * 5 / 9;
Console.ReadKey();
}
}
}
Create a program that compares two numbers and prints whether they are equal, or not. (20
points)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication11
{
class Program
{
static void Main(string[] args)
{
// OLIVER CAMILLE JOY R
// 1-F6
if (num1 == num2)
Console.Write("Equal");
else
Console.Write("Not Equal");
Console.ReadKey();
}
}
}