The Guide Show How-to Add the Latest Code::Blocks PPA Repository for Linux Ubuntu Based Desktops.
And Code::Blocks for Ubuntu is a Free C, C++ and Fortran IDE built to meet the most demanding needs of its users. It is Designed to be very Extensible and fully Configurable.

-
Open a Command Line Console Session
-
Enabling the Code::Blocks Apt PPA
-
Refresh Apt Repositories
And for Ubuntu 18.04+ if you find a Not Found Issue then Amend it Manually:
And Change the Release to ‘bionic’!
Ctrl+x to Save & Exit from nano Editor. -
Installing Code::Blocks