def main
( args
: Array
[ String
] ) { val l
= List
( new AClass, AnObject, ACompanionExample
) l.map ( a => a.autocorrect )
.foreach ( println)
}
}
def autocorrect
: String
// this is abstract }
def autocorrect
= "AClass autocorrect" }
def autocorrect
= "AnObject autocorrect" }
def autocorrect
= "CompanionExample autocorrect" }
Cm9iamVjdCBNYWluIHsKICBkZWYgbWFpbihhcmdzOiBBcnJheVtTdHJpbmddKSB7CiAgICAgIHZhbCBsID0gTGlzdChuZXcgQUNsYXNzLCBBbk9iamVjdCwgQUNvbXBhbmlvbkV4YW1wbGUpCiAgICAgIGwubWFwKGEgPT4gYS5hdXRvY29ycmVjdCkKICAgICAgLmZvcmVhY2gocHJpbnRsbikKICB9Cgp9Cgp0cmFpdCBBdXRvY29ycmVjdG9yIHsKICBkZWYgYXV0b2NvcnJlY3Q6IFN0cmluZyAvLyB0aGlzIGlzIGFic3RyYWN0Cn0KCmNsYXNzIEFDbGFzcyBleHRlbmRzIEF1dG9jb3JyZWN0b3IgewogIGRlZiBhdXRvY29ycmVjdCA9ICJBQ2xhc3MgYXV0b2NvcnJlY3QiCn0KCm9iamVjdCBBbk9iamVjdCBleHRlbmRzIEF1dG9jb3JyZWN0b3IgewogIGRlZiBhdXRvY29ycmVjdCA9ICJBbk9iamVjdCBhdXRvY29ycmVjdCIKfQoKY2xhc3MgQUNvbXBhbmlvbkV4YW1wbGUKb2JqZWN0IEFDb21wYW5pb25FeGFtcGxlIGV4dGVuZHMgQXV0b2NvcnJlY3RvciB7CiAgZGVmIGF1dG9jb3JyZWN0ID0gIkNvbXBhbmlvbkV4YW1wbGUgYXV0b2NvcnJlY3QiCn0K
stdin
CiNpbmNsdWRlICZsdDttYXRoLmgmZ3Q7CnZvaWQgbWFpbiAoKQp7CmludCBhLGIsYyxkaXNjOwpwcmludGYgKCZxdW90O2VudGVyIHRoZSB2YWx1ZXMgb2YgYSxiLGMgdmFsdWVzJnF1b3Q7KTsKc2NhbmYoJnF1b3Q7JWQlZCVkJnF1b3Q7OyZhbXA7YSwmYW1wO2IsJmFtcDtjKTsKZGlzYz0oYipiKS0oNCphKmMpOwppZiAoZGlzYyZndDswKQp7CnByaW50ZigmcXVvdDt0aGUgcm9vdHMgYXJlIHJlYWwgYW5kIGRpZmZyZW50JnF1b3Q7KTsKfQplbHNlIGlmIChkaXNjID0wKQp7CnByaW50ZigmcXVvdDt0aGUgcm9vdHMgYXJlIHJlYWwgYW5kIGVxdWFsJnF1b3Q7KQp9CmVsc2UgaWYgKGRpc2MmbHQ7MCkKewpwcmludGYoJnF1b3Q7cm9vdHMgYXJlIGNvbXBsZXggYW5kIGRpZmZyZW50JnF1b3Q7KQp9CmVsc2UKewpwcmludGYoJnF1b3Q7cm9vdHMgZG9lc24ndCBleGlzdCZxdW90OykKfQp9Cg==
#include <math.h>
void main ()
{
int a,b,c,disc;
printf ("enter the values of a,b,c values");
scanf("%d%d%d";&a,&b,&c);
disc=(b*b)-(4*a*c);
if (disc>0)
{
printf("the roots are real and diffrent");
}
else if (disc =0)
{
printf("the roots are real and equal")
}
else if (disc<0)
{
printf("roots are complex and diffrent")
}
else
{
printf("roots doesn't exist")
}
}