Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace mission19
- {
- class Program
- {
- static string TulostaJaLue(string ohje)
- {
- Console.Write(ohje);
- return Console.ReadLine();
- }
- static void KysyTiedot(ref string nimi, ref int ika, ref string henkiloTunnus, ref float pituus, ref float paino)
- {
- nimi = TulostaJaLue("Syötä nimesi: ");
- ika = Int32.Parse(TulostaJaLue("Syötä ikäsi: "));
- henkiloTunnus = TulostaJaLue("Syötä henkilötunnuksesi: ");
- pituus = float.Parse(TulostaJaLue("Syötä pituutesi: "));
- paino = float.Parse(TulostaJaLue("Syötä painosi: "));
- }
- static void Main(string[] args)
- {
- string nimi = "";
- int ika = 0;
- string henkiloTunnus = "";
- float pituus = 0;
- float paino = 0;
- KysyTiedot(ref nimi, ref ika, ref henkiloTunnus, ref pituus, ref paino);
- Console.WriteLine(nimi + ika + henkiloTunnus + pituus + paino);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement