Skip to content

workintechprojecozumu #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ function KareninAlani(kenaruzunlugu) {
4. Hesaplanan çemberin çevresi döndürülecektir.
*/

function CemberinCevresi(/* kodlar buraya */) {
/* kodlar buraya */
function CemberinCevresi(yaricap) {
return 2 * pi * yaricap;
}

/* (Oto test yok) Yukarıdaki CemberinCevresi fonksiyonunu yarıçap = 5 vererek aşağıda çalıştırıp, sonucu konsolda gözlemleyin (console.log) */
Expand All @@ -64,8 +64,8 @@ function CemberinCevresi(/* kodlar buraya */) {
4. Hesaplanan çemberin alanı döndürülecektir.
*/

function CemberinAlani(/* kodlar buraya */) {
/* kodlar buraya */
function CemberinAlani(yaricap) {
return pi * Math.pow(yaricap, 2);
}

/* (Oto test yok) Yukarıdaki CemberinAlani fonksiyonunu yarıçap = 15 vererek aşağıda çalıştırıp, sonucu konsolda gözlemleyin (console.log) */
Expand Down Expand Up @@ -99,27 +99,49 @@ let ucetambolunenler,

// 3a çözümü

/* kodlar buraya */

let enBuyuk = sayilar[0];
let enKucuk = sayilar[0];
for (let i = 1; i < sayilar.length; i++ ) {
if (sayilar[i] > enBuyuk ) {
enBuyuk= sayilar[i];
}
if (sayilar[i] < enKucuk ) {
enKucuk= sayilar[i];
}
}
// 3b çözümü:

/* kodlar buraya */
let ucTamBolunenler = [] ;
sayilar.forEach((sayi) => {
if (sayi % 3 === 0) {
ucTamBolunenler.push(sayi);
}
});

// 3c çözümü:

/* kodlar buraya */
let ucTamBolunenlerinToplami = ucTamBolunenler.reduce((toplam, sayi) => toplam + sayi,

// 3d çözümü

/* kodlar buraya */
let besyuzdenKucukSayilar = sayilar.filter(sayi => sayi < 500);

// 3e çözümü

/* kodlar buraya */
let siraliSayilar = besyuzdenKucukSayilar.sort((a, b) => a - b );

// 3f çözümü

/* kodlar buraya */
let tekrarSayilar = {} ;
sayilar.forEach(sayi => {
tekrarSayilar[sayi] = (tekrarSayilar[sayi] || 0 ) + 1 ;
});

let tekrarEdenSayilar = [];
for (let sayi in tekrarSayilar) {
if (tekrarSayilar[sayi] > 1) {
tekrarEdenSayilar.push(`${sayi} sayısı ${tekrarSayilar[sayi]} kere tekrar edilmiştir`);
}
}

/* Bu satırın aşağısındaki kodları lütfen değiştirmeyin */

Expand Down