17 Kasım 2014 Pazartesi

c++ da öğrencinin vize,final ve devamsızlığını hesaplayıp geçip geçmediğini ,geçtiyse hangi harfle geçtiğini bulan program

#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <stdio.h>

using namespace std;

int main()
{
int vize, final, devamsizlik;

char ortalama,vizeToplam,finalToplam;

int i = 1;
do

{
cout << i << ". ogrencinin vize notunu giriniz: ";

cin >> vize;

if (vize == -1)

{
cout << "program kapaniyor";
}


vizeToplam = (vize * 0.35);

if (vizeToplam < 20 || vizeToplam > 35)
{
cout << i << ". ogrenci basarisiz "<<endl<<endl;
}
else
{
cout << i << ". ogrencinin final notunu giriniz:  ";
cin >> final;


finalToplam = (final * 0.65);

cout << i << ". ogrencinin devamsiz gun sayisi:  ";
cin >> devamsizlik;


if (devamsizlik < 15 || devamsizlik > 30)
{
cout<<i<<". ogrenci devamsizliktan KALDI "<<endl<<endl;
}
else
{
ortalama = vizeToplam + vizeToplam;

if (0 <= ortalama && ortalama <= 44) cout<<i<<". Ogrencinin basari harf notu FF.. Ogrenci KALDI "<<endl<<endl;
else if (45 <= ortalama && ortalama <= 54) cout<<i<<". Ogrencinin basari harf notu DD.. Ogrenci GECTI "<<endl<<endl;
else if (55 <= ortalama && ortalama <= 69) cout<<i<<". Ogrencinin basari harf notu CC.. Ogrenci GECTI "<<endl<<endl;
else if (70 <= ortalama && ortalama <= 84) cout<<i<<". Ogrencinin basari harf notu BB.. Ogrenci GECTI"<<endl<<endl;
else if (85 <= ortalama && ortalama <= 100) cout<<i<<". Ogrencinin basari harf notu AA.. Ogrenci GECTI"<<endl<<endl;

}



}
i++;

}

while (vize != -1);



system("pause");

return 0;
}

0 Yorum:

Yorum Gönder

Kaydol: Kayıt Yorumları [Atom]

<< Ana Sayfa