C Programlama Çalışma Soruları – 1 (Bazıların Cevapları)

NOT: Kodlar C++’ta yazılmıştır.

1.

<blockquote><span style="color: #000000; font-size: small;">#include <cstdlib>
#include <iostream></span>

<span style="color: #000000; font-size: small;">using namespace std;</span>

<span style="color: #000000; font-size: small;">int main(int argc, char *argv[])
{
float c, k, f;
cout << "celcius cinsinden sicakligi giriniz: \n";
cin >> c ;
k=c+273;
f=(9.0/5)*c+32;
cout << "sicakligin kelvin cinsinden degeri: " << k << endl;
cout << "sicakligin fahrenheit cinsinden degeri: " << f << endl;</span>

system("PAUSE");
return EXIT_SUCCESS;
}

3.

<blockquote><span style="color: #000000;">#include <cstdlib>
#include <iostream></span>

<span style="color: #000000;">using namespace std;</span>

<span style="color: #000000;">int main(int argc, char *argv[])
{
cout << "*\n**\n***\n****\n*****\n\n\n\n";
cout << "*" << endl << "**" << endl << "***" << endl << "****" << endl << "*****" << endl ;
// İki cout ta aynı görevi görür.
system("PAUSE");
return EXIT_SUCCESS;
}</span>

Yorum Yapın

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d blogcu bunu beğendi: