Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
#include "conio.h"
main()
{
{
for(int i=0 ;i<5; i++)
{
printf ("sayi =%dn", i); > AYNI CIKTIYI VERİYOR
}
int a = 0;
while(a<5)
{
printf("sayii = %dn",a); > AYNI CIKTIYI VERİYOR
}
getche();
}
}
-------------------------------------------------------------------
#include "stdio.h"
#include "conio.h"
//girilen 5 sayinin topl.mı ve ort bulun
main()
{
int sayi,toplam=0;
float ort;
for(int i=0; i<5; i++)
{
printf ("%d.sayiyi girin: ",i+1);
scanf("%d",&sayi);
toplam+=sayi;
}
ort =toplam*1.0/5;
printf("Toplam= %d ortalama= %.2f",toplam,ort);
getche();
}
-----------------------------------------------------------
#include "stdio.h"
#include "conio.h"
// 1-10 sayiları arası(dahil) olan sayıların toplam ve ort yazın
main()
{
int toplam=0;
int i;
for(i=1;i<10;i++)
{
toplam+=i;
}
printf ("toplam= %d ortalama = %.2f",toplam,(toplam*1.0/(i-1)));
getche();
}
-----------------------------------------------------------
#include "stdio.h"
#include "conio.h"
//10 sayi gir 2 ye 3e ve 5e bolunenlerin ayrı ayrı adet ,toplam ve ortması
main()
{
int sayi,k_ad=0,k_top=0,c_ad=0,c_top=0,b_ad=0,b_top=0;
float k_ort,c_ort,b_ort;
for(int i=0;i<10;i++)
{
printf("%d sayi giriniz: ",i+1);
scanf("%d",&sayi);
if(sayi%2==0)
{
k_ad++; k_top+=sayi;
}
if(sayi%3==0)
{
c_ad++; c_top+=sayi;
}
if(sayi%5==0)
{
b_ad++; b_top+=sayi;
}
}
k_ort = k_top* 1.0 / k_ad;
c_ort = c_top* 1.0 / c_ad;
b_ort = b_top* 1.0 / b_ad;
printf("n 2 ye bolunen %d toplam %d ort =%.2f",k_ad,k_top,k_ort);
printf("n 3 ye bolunen %d toplam %d ort =%.2f",c_ad,c_top,c_ort);
printf("n 5 ye bolunen %d toplam %d ort =%.2f",b_ad,b_top,b_ort);
getche();
}
-----------------------------------------------------------------
#include "stdio.h"
#include "conio.h"
//iki sayi arasındakı çift sayıların adet top ort
main()
{
int a,b;
printf ("sayi gir: ");
scanf("%d",&a);
printf ("ikinci sayi gir: ");
scanf("%d",&b);
if(a>b)
{
int c=a;
a=b;
b=c;
}
int toplam=0,adet=0;
for(int i=a;i<=b;i++)
{
if(i %2==0)
{
toplam+=i;
adet++;
}
}
printf("n %d adet cift sayi var",adet);
printf("n %d toplam",toplam);
printf("n %.2f ort",(toplam*1.0)/adet);
getche();
}
-----------------------------------------
#include "stdio.h"
#include "conio.h"
// bir sayının faktöriyeli
main()
{
int sayi,sonuc=1;
printf("sayi gir :");
scanf("%d",&sayi);
//for (int i=2;i<=sayi;i++) //> her iki forda aynı işlemi yapar
for(int i=sayi;i>=2;i--)
sonuc*=i;
printf("%d sayisinin faktöriyeli = %d",sayi,sonuc);
getche();
}
-----------------------------------------------------------
#include "stdio.h"
#include "conio.h"
//carpma isleminin sonucunu toplama işlemi ile bulunuz.
main()
{
int a,b,toplam=0;
printf("ilk sayi gir:");
scanf("%d",&a);
printf("ikinci sayi gir:");
scanf("%d",&b);
for(int i=0;i<a;i++)
toplam+=b;
// >her iki forda aynı işlemi yapıyor
//for(int i=0;i<b;i++)
//toplam+=a;
printf("sonuc = %d",toplam);
getche();
}
--------------------------------------------------------------
#include "stdio.h"
#include "conio.h"
//bolme işleminin sonucunu cıkarma işlemi ile bulunuz.
main()
{
int a,b,sonuc=0;
printf("ilk sayi giriniz:");
scanf("%d",&a);
printf("ikinci sayi giriniz:");
scanf("%d",&b);
int c=a;
while(a>=b)
{
a=a-b;
sonuc++;
}
printf("%d / %d = %d",c,b,sonuc);
getche();
}
------------------------------------------------------
#include "stdio.h"
#include "conio.h"
// girilen sayıların basamaklarını toplamını bulan.
main()
{
int sayi ,basamak,toplam=0;
printf("sayi girin: ");
scanf("%d",&sayi);
while(sayi!=0)
{
basamak = sayi % 10;
toplam+=basamak;
sayi=sayi/10;
}
printf("basamak toplamı = %d ",toplam);
getche();
}
-----------------------------------------------------------------
#include "stdio.h"
#include "conio.h"
// girilen 2 sayılardan biri degerinin üssü alacak sekilde üs alma işlemini yapan
main()
{
int a,b,sonuc=1;
printf ("taban giriniz: ");
scanf("%d",&a);
printf ("us giriniz: ");
scanf("%d",&b);
for(int i=0; i<b; i++)
{
sonuc*=a;
}
printf("%d sayisinin %d ussu = %d",a,b,sonuc);
getche();
}
--------------------------------------------------------------------
#include "stdio.h"
#include "conio.h"
// girilen sayıların tam kare sayi olup olmadıgını bulan tam kare ise kökünü bulan pro.
main()
{
int sayi,kontrol=0;
printf("sayi giriniz : ");
scanf("%d",sayi);
for (int i=0;i<sayi;i++)
{
if(i*i==sayi)
{
printf("%d sayisi %d sayini kokudur",i,sayi);
kontrol =1;
break;
}
if (kontrol==0)
printf("%d sayisi tam kare sayi degildir",sayi);
}
getche();
}
![]() |
Notes is a web-based application for online 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 14 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