సంక్లిష్ట కార్యకలాపాలు
Scala
xxxxxxxxxx
object complexOps extends Application {
class Complex(val re: Double, val im: Double) {
def + (that: Complex) =
new Complex(re + that.re, im + that.im)
def - (that: Complex) =
new Complex(re - that.re, im - that.im)
def * (that: Complex) =
new Complex(re * that.re - im * that.im,
re * that.im + im * that.re)
def / (that: Complex) = {
val denom = that.re * that.re + that.im * that.im
new Complex((re * that.re + im * that.im) / denom,
(im * that.re - re * that.im) / denom)
}
override def toString =
re + (if (im < 0) "-" + (-im) else "+" + im) + "*i"
}
val x = new Complex(2, 1); val y = new Complex(1, 3)
println(x + y)
}
Linux - anc-api-tools ని ఎలా ఇన్స్టాల్ చేయాలి
Linux - curvedns ని ఎలా ఇన్స్టాల్ చేయాలి
Linux - zenmap ని ఎలా ఇన్స్టాల్ చేయాలి
Python - సంఖ్య సానుకూలంగా ఉందా, ప్రతికూలంగా ఉందా లేదా 0 అని తనిఖీ చేయండి
C - పూర్ణాంకంలో అంకెల సంఖ్యను లెక్కించండి
C++ - సంఖ్య ప్రధానమైనదా కాదా అని తనిఖీ చేయండి
C - డైనమిక్ మెమరీ కేటాయింపును ఉపయోగించి అతిపెద్ద సంఖ్యను కనుగొనండి
C++ - లీప్ ఇయర్ని తనిఖీ చేయండి
Kotlin - ఒక సంఖ్యను రివర్స్ చేయండి
JavaScript - స్ట్రింగ్ కొన్ని అక్షరాలతో ప్రారంభమై ముగుస్తుందో లేదో తనిఖీ చేయండి
Linux - zstd ని ఎలా ఇన్స్టాల్ చేయాలి
C++ - కోషెంట్ మరియు రిమైండర్ను కనుగొనండి
Kotlin - సంఖ్య యొక్క కారకాన్ని కనుగొనండి
Python - Excel (XLSX) ఫైల్లను వ్రాయడం
Linux - xbitmaps ని ఎలా ఇన్స్టాల్ చేయాలి
Java - ఒక సంఖ్యను రివర్స్ చేయండి
Kotlin - ఒక సంఖ్యను n దశాంశ స్థానాలకు రౌండ్ చేయండి
Java - పిరమిడ్ మరియు నమూనాను సృష్టించండి
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month