void main()
{
//odd r even
var a= 4;
if(a%2==0){
print("even");
}else{
print("odd");
}
if(a>0){
print("+ve");
}else{
print("-ve");
}
//sum of n natural num
s(n){
return (n*(n+1))/2;
}
s(a);
print(s(a));
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter