Programming Challenges - Solutions
336 subscribers
11 links
Download Telegram
Forwarded from Programming Challenges
Counting days
difficulty: easy
time: 2h
languages: any
====================
Given an amount of days n, calculate the date of today + n in the format "DD / MM / YYYY"

credits: @arcobi
Forwarded from Deleted Account
>>> 'hello world'[::-1]
'dlrow olleh'
Forwarded from Deleted Account
while a%b:
a,b = b,a%b



print("\n",b)
Forwarded from Deleted Account
C++
#include<iostream>
Using namespace std;
Int main()
{
int a ;
cin >>a;
int w=a*2+5;
for (int x= 0;x<a;++x)
{
for(int y=2;y>= 0;--y)
{
for(int z=0; z<a+y-x;++z ).
{
cout<<" ";
}
for( int z=0;z<x*2-y*2+5;++z )
{
cout<<".";
}cout <<endl;
}
}
for(int x=0; x<w/5+1;++x)
{
for(int z=0; z<w/3+1;++z)
{
cout<<" ";
}
for( int z=0;z<w-(w/3+1)*2;z+=1)
{
cout <<"#";
}
cout <<endl;
}
}
Forwarded from Deleted Account
Of user enters 5
Forwarded from Deleted Account
.
...
.....
...
.....
.......
.....
.......
.........
.......
.........
...........
.........
...........
.............
###
###
###
Forwarded from Deleted Account
.
...
.....
...
.....
.......
.....
.......
.........
.......
.........
...........
.........
...........
.............
###
###
###