Created
October 19, 2024 20:05
-
-
Save ahmetcanisik/28d8408fead0d4ae0b84f2afd993dd3f to your computer and use it in GitHub Desktop.
Alınan doğum yılı bilgisine göre kullanıcının yaşını hesaplayan programın kodları
This file contains hidden or 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
using System; | |
public class Algoritma | |
{ | |
private static string input(string message = "") { | |
Console.Write(message); | |
return Console.ReadLine(); | |
} | |
public static void Main(string[] args) | |
{ | |
// dy = doğum yılı | |
// sz = şimdiki zaman | |
int dy, sz = 2024; | |
dy = Convert.ToInt16(input("Doğum Yılınızı Giriniz: ")); | |
Console.WriteLine("{0} yaşındasınız.", (sz - dy)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment