Created
November 2, 2023 22:02
-
-
Save yusufpapurcu/593b2ef6fabf2ff1154e7205bc7efc87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
const float midterm_ratio = 0.6; | |
const float final_ratio = 0.4; | |
printf("DERS ORTALAMASI HESAPLAMA\n"); | |
printf("-----------------------------------\n"); | |
printf("OGRENCI SAYISINI GIRINIZ:"); | |
int students, current_student , student_no , midterm , final , ort ; | |
current_student = 1; | |
ort = 0; | |
scanf_s("%d", &students); | |
while(students >= current_student) { | |
printf("-----------------------------------\n"); | |
printf("%d.OGRENCININ OGRENCI NUMARASINI GIRINIZ:", current_student ); | |
scanf_s("%d", &student_no); | |
printf("%d.OGRENCININ VIZE NOTUNU GIRINIZ:" , current_student ); | |
scanf_s("%d", &midterm); | |
printf("%d.OGRENCININ FINAL NOTUNU GIRINIZ:" , current_student ); | |
scanf_s("%d", &final); | |
ort = final_ratio * final + midterm_ratio * midterm; | |
printf("-----------------------------------\n"); | |
printf("%d.OGRENCININ OGRENCI NO:%d\n", current_student , student_no ); | |
printf("%d.OGRENCININ VIZE NOTU:%d\n" , current_student , midterm ); | |
printf("%d.OGRENCININ FINAL NOTU:%d\n", current_student, final); | |
printf("%d.OGRENCININ DONEM ORTALAMASI:%d\n", current_student , ort ); | |
current_student++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment