![]() |
|
#1
|
|||
|
|||
|
#include <stdlib.h> #include <math.h> #include <time.h> int main (void){ int *notlar;//int notlar[5] int i; int mevcut; cout<<"Mevcut: "; cin>>mevcut; srand (time(0)); //new: yeni bellek alımı için gerekli komut //int: alınacak belleğin tipini gösteriyor //parantez içindeki mevcut ifadesi de bellek miktarını notlar = new int(mevcut); for (i=0;i<mevcut;i++) notlar[i]=rand()%100+1; for (i=0;i<mevcut;i++){ if (notlar[i]>50) cout<<"Not: "<<notlar[i]<<" "<<i+1<<". ogrenci basarili"<<endl; else cout<<"Not: "<<notlar[i]<<" "<<i+1<<". ogrenci sinifta kaldi"<<endl; } system ("PAUSE"); return EXIT_SUCCESS; } |
![]() |
| Seçenekler | |
| Stil | |
|
|