Notes
Notes - notes.io |
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _OverLoadstarting
{
class Program
{
static public double sinavhesapla(int a, int b)
{
return (a + b) / 2;
}
static public double sinavhesapla(int a, int b, int c)
{
return (a + b + c) / 3;
}
static public double sinavhesapla(int a, int b, int c, int d)
{
return (a + b + c + d) / 4;
}
static public double sinavhesapla(int a, int b, int c, int d, int e)
{
return (a + b + c + d + e) / 5;
}
static public double sozluhesapla(int a)
{
return a;
}
static public double sozluhesapla(int a, int b)
{
return (a + b) / 2;
}
static public double sozluhesapla(int a, int b, int c)
{
return (a + b + c) / 3;
}
static public double odevhesapla(int a)
{
return a;
}
static public double odevhesapla(int a, int b)
{
return (a + b) / 2;
}
static public double odevhesapla(int a, int b, int c)
{
return (a + b + c) / 3;
}
static public double ortalama(double a,double b,double c)
{
return (a *0.70) + (b * 0.12) + (a * 0.18);
}
static void Main(string[] args)
{
int y1 = 0, y2 = 0, y3 = 0, y4 = 0, y5 = 0, s1 = 0, s2 = 0, s3 = 0, o1 = 0, o2 = 0, o3 = 0;
double yOrt = 0, sOrt = 0, oOrt = 0,ort=0;
string secim = "";
Console.WriteLine("1.Sınav notunu giriniz =");
y1 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("2.Sınav notunu giriniz =");
y2 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni sınav notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
if (secim == "e")
{
Console.WriteLine("3.Sınav notunu giriniz =");
y3 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni sınav notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
if (secim == "e")
{
Console.WriteLine("4.Sınav notunu giriniz =");
y4 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni sınav notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
if (secim == "e")
{
Console.WriteLine("5.Sınav notunu giriniz =");
y5 = Convert.ToInt16(Console.ReadLine());
}
}
}
Console.WriteLine("1.Sözlü notunu giriniz =");
s1 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni Sözlü notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
if (secim == "e")
{
Console.WriteLine("2.Sözlü notunu giriniz =");
s2 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni Sözlü notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
if (secim == "e")
{
Console.WriteLine("3.Sözlü notunu giriniz =");
s3 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni Sözlü notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
}
}
Console.WriteLine("1.Ödev notunu giriniz =");
o1 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni Ödev notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
if (secim == "e")
{
Console.WriteLine("2.Ödev notunu giriniz =");
o2 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni Ödev notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
if (secim == "e")
{
Console.WriteLine("3.Ödev notunu giriniz =");
o3 = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Yeni Ödev notu girmek istiyo msuunuz ? e h");
secim = Console.ReadLine();
}
}
if (y5 > 0)
{
yOrt = sinavhesapla(y1, y2, y3, y4, y5);
}
else if (y4 > 0)
{
yOrt = sinavhesapla(y1, y2, y3, y4);
}
else if (y3 > 0)
{
yOrt =sinavhesapla(y1, y2, y3);
}
else
{
yOrt = sinavhesapla(y1, y2);
}
if (s3 > 0)
{
sOrt = sozluhesapla(s1, s2, s3);
}
else if (s2 > 0)
{
sOrt = sozluhesapla(s1, s2);
}
else
{
sOrt = sozluhesapla(s1);
}
if (o3 > 0)
{
oOrt = odevhesapla(o1, o2, o3);
}
else if (o2 > 0)
{
oOrt = odevhesapla(o1, o2);
}
else
{
oOrt =odevhesapla(o1);
}
Console.WriteLine(yOrt+" "+sOrt+" "+oOrt);
ort = ortalama(yOrt, sOrt, oOrt);
Console.WriteLine(ort);
if (ort>84)
{
Console.WriteLine("A");
}
else if (ort >69)
{
Console.WriteLine("B");
}
else if (ort >54)
{
Console.WriteLine("C");
}
else if (ort>44)
{
Console.WriteLine("D");
}
else
{
Console.WriteLine("F");
}
Console.ReadKey();
//1 ile 10 arasında bir random sayı üretilecek eleman sayısı
}
}
}
|
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team