Public static void Main(string[] args) { transport car=new
Download 100.2 Kb.
|
Mo\'minov
class Program { public static void Main(string[] args) { transport car=new transport(); car.Chiqarish(); Console.ReadKey(true); } } class transport {
internal ushort yili; protected double ogirligi; public bool holati; public void Chiqarish() {
Console.WriteLine(yili); Console.WriteLine(ogirligi); Console.WriteLine(holati); } /* * Created by SharpDevelop. * User: Avtech * Date: 24.02.2022 * Time: 7:59 * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ using System; namespace и { class Program { public static void Main(string[] args) { talaba car=new talaba(); car.Chiqarish(); Console.ReadKey(true); } } class talaba {
public string familiyasi="Mo'minov"; internal double tugilgan_yili=2002; internal string tugilgan_oyi="iyul"; public uint tugilgan_kuni=13; public string manzili="Farg'ona viloyati Toshloq tumani Zarkent shaxarchasi Turvat M.F.Y Sohibqiron ko'chasi 47-uy"; public double boyi=1.69; public double vazni=62; public string oliygoh_nomi="Farg'ona davlat universiteti"; internal string fakultet_nomi="Matematika Informatika fakulteti"; internal string yonalishi="Amaliy matematika"; public double guruhi=21.06; public string talim_shakli="kunduzgi"; public string yana="Davlat granti asosida o'qishga qabul qilingan"; public string oqish_muddati="4 yil"; public string hozirda="Hozirda 1-kurs"; public string darsdan_keyin="< public void Chiqarish() {
Console.WriteLine("Familiyasi: "+familiyasi); Console.WriteLine("Tug'ilgan yili: "+tugilgan_yili); Console.WriteLine("Tug'ilgan oyi: "+tugilgan_oyi); Console.WriteLine("Tug'ilgan kuni: "+tugilgan_kuni); Console.WriteLine("Yashash manzili: "+manzili); Console.WriteLine("Bo'yining uzunligi: "+boyi); Console.WriteLine("Vazni: "+vazni); Console.WriteLine("O'qish joyi: "+oliygoh_nomi); Console.WriteLine("Qaysi fakultetda o'qiydi: "+fakultet_nomi); Console.WriteLine("Qaysi yo'nalish: "+yonalishi); Console.WriteLine("Guruh raqami: "+guruhi); Console.WriteLine("Ta'lim shakli: "+talim_shakli); Console.WriteLine("Davlat granti yoki kontrakt: "+yana); Console.WriteLine("O'qish muddati nechi yil: "+oqish_muddati); Console.WriteLine("Hozir nechanchi kurs: "+hozirda); Console.WriteLine("Darsdan tashqari nima bilan bandligi: "+darsdan_keyin); } }
/* * Created by SharpDevelop. * User: Avtech * Date: 03.03.2022 * Time: 8:09 * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ using System; namespace o {
{ public double Modul (double x) { if (x<0) x*=-1; return x; } public sbyte Ishora(double x) { if (x<0) return -1; else if (x>0) return 1; else return 0; } public double darajasi(double x, byte n) { double P=1; for (byte i=0;i return P; } }
{ public static void Main(string[] args) { Matematika m=new Matematika(); Console.Write("x ni kiriting: x="); double x = double.Parse(Console.ReadLine()); Console.Write("n ni kiriting: "); byte n = byte.Parse(Console.ReadLine()); Console.WriteLine("Sonning moduli: "+m.Modul(x)); Console.WriteLine("Ishorasi: "+m.Ishora(x)); Console.WriteLine("darajasi: "+m.darajasi(x,n)); Console.ReadKey(true); } } } { struct Matematika { public double Modul(double z) { if(z<0) z*=-1; return z; } public sbyte Ishora(double z) { if (z>0) return 1; else if (z<0) return -1; else return 0; } public double Faktorial(int k) { double p=1; if (k==0) return 1; for(int i=1;i<=k;i++) p*=i; return p; } public double Exponenta(int m) { double q=1; for(int i=1;i<=m;i++) q+=1/Faktorial(i); return q; } } class Program { public static void Main(string[] args) { Matematika a; Console.Write("x="); double x=double.Parse(Console.ReadLine()); Console.Write("n="); int n=int.Parse(Console.ReadLine()); double y=a.Modul(x); Console.WriteLine("Modul(x)="+y); y=a.Ishora(x); Console.WriteLine("Ishora(x)="+y); y=a.Faktorial(n); Console.WriteLine("Faktorial(n)="+y); y=a.Exponenta(n); Console.WriteLine("Exponenta(m)="+y); Console.ReadKey(true); } } } public string nomi1="qalam"; public string nomi2="daftar"; public string nomi3="o'chirg'ich"; public double narxi=1000; Console.WriteLine("narxi: "+narxi+"so'm" ); Console.WriteLine("2."+nomi1); Console.WriteLine("3."+nomi2); Console.WriteLine("4."+nomi3); using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Vorislik { class Program { static void Main(string[] args) { Dori a = new Dori(); a.Chiqarish(); Console.WriteLine(); Console.WriteLine("Boshqa dorini kiritasizmi? "); string aa = Console.ReadLine(); if (aa == "ha") a.Kiritish(); else if (aa != "ha") Console.WriteLine("boshqa tugmani bosdingiz "); {
osimliklar b = new osimliklar(); Console.WriteLine("Dorivor o'simliklar haqida ma'lumot olishni istaysizmi? "); string l = Console.ReadLine(); if (l == "Ha") b.Chiqarish1(); b.xossa = "Dorivor o'simliklar: odam va hayvonlarni davolash, kasalliklarni oldini olsih uchun, shuningdek, oziq-ovqat,atir upa va kosmetika sanoatida ishlatiladigan o'simliklar -giyohlar. Yer yuzida dorivor o'simliklarning 10-12 ming turi borligi aniqlangan. O'zbekistonda dorivor o'simliklarning 700 dan ortiq turi mavjud."; b.Chiqarish1(); } Console.ReadKey(); } } class Dori { private string nomi = "Dimedrol"; public string shakli = "tabletka"; public double narxi = 2000; public string yurti = "Rossiya"; public double muddati = 4; public void Kiritish() { Console.WriteLine(); Console.Write("Dorining nomini kiriting: "); nomi = Console.ReadLine(); Console.Write("Dorining shaklini kiriting: "); shakli = Console.ReadLine(); Console.Write("Dorining narxini kiriting: "); narxi = uint.Parse(Console.ReadLine()); Console.Write("Dorini ishlab chiqarilgan joy: "); yurti = Console.ReadLine(); Console.Write("Dorining yaroqlilik muddatini kiriting: "); muddati = byte.Parse(Console.ReadLine()); Console.WriteLine(); Console.WriteLine("Dorining nomi: " + nomi); Console.WriteLine("Dori shakli: " + shakli); Console.WriteLine("Dorining narxi: " + narxi + " So'm"); Console.WriteLine("Ishlab chiqarilgan joyi: " + yurti); Console.WriteLine("Yaroqlilik muddati: "+muddati+ " Yil"); Console.WriteLine(); } public void Chiqarish() { Console.WriteLine("Dorining nomi: " + nomi); Console.WriteLine("Dori shakli: " + shakli); Console.WriteLine("Dorining narxi: " + narxi + " So'm"); Console.WriteLine("Ishlab chiqarilgan joyi: " + yurti); Console.WriteLine("Yaroqlilik muddati: " + muddati + "Yil"); } } class Dorilar {protected string b;} class osimliklar : Dorilar { public void Chiqarish1() { Console.WriteLine(b); } public string xossa { set { b = value; } } } } Download 100.2 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling