NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define A 2
void foo1 (struct ogrenci *);
void foo2 (struct ogrenci *);
void foo3 (struct ogrenci *);
void foo4 (struct ogrenci *, int , float, float );
void IsmegoreSirala (struct ogrenci * );
void OrtalamayaGoreSirala (struct ogrenci *);

struct ogrenci{
char ad[20];
char soyad[30];
int no;
float vize,final,ort;
};
int main ()
{
int t;
struct ogrenci ogrenciler[A];
printf ("15 Kisilik Bir Sinif Listesi Olusturunuzn");
for (t=0; t<A; t++) scanf ("%s%s%d%f%f", ogrenciler[t].ad,ogrenciler[t].soyad, &ogrenciler[t].no, &ogrenciler[t].vize, &ogrenciler[t].final);

int i;
do{
printf ("1) Ortalama Hesaplann");
printf ("2) Bilgileri giriş sirasina gore yazdirinnn");
printf ("3) En yuksek final notuna sahip olan ogrencinin tum bilgilerini ilgili fonksiyon icinde yazdirinnn");
printf ("4) En dusuk vize notuna sahip ogrencinin tum bilgilerini main icinde yazdirinnn");
printf ("5) Main icinde klavyeden ogrenci numarasi, yeni vize ve final notlari girilen ogrencinin bilgilerinin guncellenmesini saglayan fonksiyonu yazin. nn");
printf ("6) Siniftaki ogrencileri isimlerine göre (A dan Z ye) ve ortalamalarina gore (Buyukten kucuge) ayri ayri siralayabilecek iki adet fonksiyon ekleyin. Her siralama isleminden sonra listelerin yazdırılmasını sağlayın.nn");
printf ("0) Cikisnn");
scanf ("%d", &i);
float enK=ogrenciler[0].vize;
switch (i){
case 1:
void foo1 (ogrenci *ogrenciler);
break;
case 2:
void foo2 (ogrenci *ogrenciler);
break;
case 3:
void foo3 (ogrenci *ogrenciler);
break;
case 4:
int k;
struct ogrenci kucuk=ogrenciler[0];

for (i=0; i<A; i++){
if(enK>ogrenciler[i].vize){
enK=ogrenciler[i].vize;
kucuk=ogrenciler[i];
}
}
printf ("n%s %s %d %f %f %fn", kucuk.ad, kucuk.soyad, kucuk.no, kucuk.vize, kucuk.final, kucuk.ort);
break;
case 5:
int m;
printf ("n Vize ve final notlarini degistirmek istediginiz ogrencinin sirasini giriniz");
scanf ("%d", &m);
printf ("n Vize ve final notlarini girinizn");
scanf ("%f%f", &ogrenciler[m].vize, &ogrenciler[m].final);
break;
case 6:
void IsmegoreSirala (ogrenci * ogrenciler);
void OrtalamayaGoreSirala (ogrenci *ogrenciler);
break;
default :
i=0;
}
}while (i!=0);
system ("pause");
return 0;
}
void foo1 (struct ogrenci *zoo){
int i;
for (i=0; i<A; i++)
zoo[i].ort=(zoo[i].vize+zoo[i].final)/2;
}
void foo2 (struct ogrenci *zoo){
int o;
printf ("Ad Soyad No Vize Final Ortalama");
for (o=0; o<A; o++)
printf ("%s %s %d %f %f %fn", zoo[o].ad, zoo[o].soyad, zoo[o].no, zoo[o].vize, zoo[o].final, zoo[o].ort);
}
void foo3 (struct ogrenci *zoo){
int i;
struct ogrenci yedek=zoo[0];
float enB=zoo[0].final;
for (i=0; i<A; i++){
if(enB<zoo[i].final){
enB=zoo[i].final;
yedek=zoo[i];
}
}
printf ("n%s %s %d %f %f %fn", yedek.ad, yedek.soyad, yedek.no, yedek.vize, yedek.final, yedek.ort);
}

void IsmegoreSirala (struct ogrenci *zoo ){
int l,j, i;
struct ogrenci yedek;
for (l=0; l<A; l++){
for (j=0; j<(A-1); j++){
if (strcmp (zoo[l].ad, zoo[l+1].ad)<0)
yedek=zoo[l];
zoo[l]=zoo[l+1];
zoo[l+1]=yedek;
}
}


for (i=0; i<A; i++)
printf ("%s n", zoo[i].ad);
}
void OrtalamayaGoreSirala (struct ogrenci *zoo){
int i,j;
float yedek;
for (i=0; i<A; i++){
for (j=0; j<(A-1); j++)
if (zoo[i].ort<zoo[i+1].ort){
yedek=zoo[i].ort;
zoo[i].ort=zoo[i+1].ort;
zoo[i+1].ort=yedek;
}
}
for (i=0; i<A; i++)
printf ("%f n", zoo[i].ort);
}












     
 
what is notes.io
 

Notes.io is a web-based application for 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 12 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

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.