This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include | |
int main(){ | |
int x, y, z; | |
printf("Lutfen 1. Sayiyi Giriniz: "); | |
scanf("%d", &x); | |
printf("Lutfen 2. Sayiyi Giriniz: "); | |
scanf("%d", &y); | |
printf("Lutfen 3. Sayiyi Giriniz: "); | |
scanf("%d", &z); | |
if(x>=y && x>=z){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include | |
int islem(int x, int y); | |
int main(){ | |
int x; | |
double y; | |
char karakter; | |
printf("Ondalikli Sayi Giriniz: "); | |
scanf("%lf", &y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include | |
int main(){ | |
int birincisayi, ikincisayi, sayi=0, i; | |
printf("N Sayisi : "); | |
scanf("%d", &birincisayi); | |
printf("M Sayisi : "); | |
scanf("%d", &ikincisayi); | |
if (birincisayi == 1){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include | |
int main(){ | |
char secim; | |
do{ | |
int n, i, fact=1, toplam=0; | |
printf("N Tamsayisini Girin: "); | |
scanf("%d", &n); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include | |
int main(){ | |
int i=0, n, m, cifttoplam=0, tektoplam=0, teksayac=0, ciftsayac=0; | |
printf("Girdi 'N' Degeri 'M' Degerinden Buyuk Olmalidir."); | |
bas: | |
printf("\nN Degerini Girin : "); | |
scanf("%d", &n); | |
printf("M Degerini Girin : "); | |
scanf("%d", &m); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
private TextView sehirTv, sicaklikTv; | |
private ImageView imageView; | |
private String sehir= "Istanbul"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onPostExecute(String s) { | |
Hava hava = jsonAyikla(s); | |
if(hava==null){ | |
Log.e("HATA", "Bastırılamadı"); | |
} | |
else { | |
sehirTv.setText("Istanbul"); | |
sicaklikTv.setText(hava.get_description().toUpperCase() + "\n" + hava.get_temp()+ ""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Hava jsonAyikla(String s) { | |
Hava hava = null; | |
try { | |
JSONObject root = new JSONObject(s); | |
JSONArray weather = root.getJSONArray("weather"); | |
JSONObject zero = weather.getJSONObject(0); | |
int id = zero.getInt("id"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Hava { | |
private int _id; | |
private String _description; | |
private double _temp; | |
public Hava(int id, String description, double temp){ | |
_id=id; | |
_description=description; | |
_temp=temp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class Indirme extends AsyncTask<String, Void, String> { | |
@Override | |
protected String doInBackground(String... strings) { | |
String jsonCevabiAl = jsonCevabi(strings[0]); | |
return jsonCevabiAl; | |
} | |
@Override | |
protected void onPostExecute(String s) { | |
Hava hava = jsonAyikla(s); |