Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- }
- static void task01()
- {
- int countA = 0, countB = 0, countC = 0, getMark, excellentGrade;
- for (int x = 1; x <= 100; x++)
- {
- Console.WriteLine("Enter number");
- getMark = int.Parse(Console.ReadLine());
- if (getMark < 55)
- countA++;
- else if (getMark > 56 && getMark < 70)
- countB++;
- else if (getMark > 69 && getMark < 91)
- countC++;
- }
- excellentGrade = 100 - (countA + countB + countC);
- Console.WriteLine("55: {0}\n56-69: {1}\n70-90: {2}\n90+: {3}", countA, countB, countC, excellentGrade);
- }
- static void task02()
- {
- int total = 0, getEarn, highest = 0;
- for (int x = 1; x <= 10; x++)
- {
- Console.WriteLine("enter money");
- getEarn = int.Parse(Console.ReadLine());
- total += getEarn;
- if (getEarn > highest)
- highest = getEarn;
- }
- Console.WriteLine("Total: {0}\nHighest: {1}", total, highest);
- }
- static void task03()
- {
- int dropIDWinner = 0, dropIDLosser = 0, lengthDrop, high = 0, low = 0;
- double avarageDrops = 0;
- for (int x = 1; x <= 17; x++)
- {
- Console.WriteLine("enter length` drop");
- lengthDrop = int.Parse(Console.ReadLine());
- avarageDrops += lengthDrop;
- if (high == 0 && low == 0)
- {
- high = lengthDrop;
- low = lengthDrop;
- dropIDWinner = x;
- dropIDLosser = x;
- }
- if(lengthDrop > high)
- {
- high = lengthDrop;
- dropIDWinner = x;
- }
- else if(lengthDrop < low)
- {
- low = lengthDrop;
- dropIDLosser = x;
- }
- }
- Console.WriteLine("Winner: ID - {0}, Length - {1}\nLoser: ID - {2}, Length - {3}\nAvarage Drops: {4}", dropIDWinner, high, dropIDLosser, low, (avarageDrops / 17));
- }
- static void task04()
- {
- int count = 0, getNum;
- for (int x = 1; x <= 100; x++)
- {
- Console.WriteLine("enter number");
- getNum = int.Parse(Console.ReadLine());
- if ((x * x) == getNum)
- count++;
- }
- Console.WriteLine("Total: ", count);
- }
- }
- }
Add Comment
Please, Sign In to add comment