17 June 2023
M N N M M M M M
M N M
Dastur parchasi natijasida ekranga nima chop etiladi
multimap <int, char> st;
pair <int, char> zap;
int i; char s;
for (i=0; i<10;i++)
{
zap.first=i%4;
zap.second='A'+i;
st.insert(zap);
}
for(auto it=st.begin(); it!=st.end(); it++)
cout<<it->second<<" ";
====
0 0 0 1 1 1 2 2 3 3
====
kompilyasiyada hatolik yz beradi
====
#A E I B F J С G D H
====
A B C D E F G H I J
D M
@mamurjondeveloper guruhdagi oʻchirilgan hisoblar va anchadan beri kirilmaganlarni chiqarib yuboring
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ulugbekovna_Lobar
{
class Counter
{
public int Value { get; set; }
public static bool operator >(Counter c1, Counter c2)
{
return c1.Value > c2.Value;
}
public static bool operator <(Counter c1, Counter c2)
{
return c1.Value < c2.Value;
}
}
class Program
{
static void Main(string[] args)
{
Counter c1 = new Counter { Value = 23 };
Counter c2 = new Counter { Value = 45 };
bool result = c1 > c2;
Console.WriteLine(result);
bool result = c1 < c2;
Console.WriteLine(result1);
Console.ReadKey();
}
}
}
K . . using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Ulugbekovna_Lobar { class Counter { public int Value { get; set; } public static bool operator >(Counter c1, Counter c2) { return c1.Value > c2.Value; } public static bool operator <(Counter c1, Counter c2) { return c1.Value < c2.Value; } } class Program { static void Main(string[] args) { Counter c1 = new Counter { Value = 23 }; Counter c2 = new Counter { Value = 45 }; bool result = c1 > c2; Console.WriteLine(result); bool result1 = c1 < c2; Console.WriteLine(result1); Console.ReadKey(); } } }K . K
using System;
namespace Ulugbekovna_Lobar
{
class Sinf1
{
public byte a=250;
public int b { get; private set; }
public double Method1(double b)
{
a += (byte)(b+this.b);
return a<<2;
}
public void Method2()
{
a += ++this.a;
}
}
class Program
{
static void Main(string[] args)
{
Sinf1 a = new Sinf1();
double c = 45;
Sinf2 b = new Sinf2();
b.Method1(a.Method1(c));
Console.WriteLine(b.Method2());
}
}
class Sinf2
{
public int a;
Sinf1 c = new Sinf1();
public void Method1(double a)
{
this.a = (int)a;
++a;
c.Method2();
}
public double Method2()
{
return a<<3;
}
}
}