Ono overit preklad z mnohych jazykov je mozne jednoducho a online... Obe verzie som ksusil a moc sa nepodobaju...
https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,selection:(endColumn:2,endLineNumber:16,positionColumn:2,positionLineNumber:16,selectionStartColumn:2,selectionStartLineNumber:16,startColumn:2,startLineNumber:16),source:'//+Type+your+code+here,+or+load+an+example.%0Aint+owerflow_check(int+a,+int+b)+%7B%0A++++if(a%2Bb+%3C+a)+%7B%0A++++++++return+0%3B%0A++++%7D+else+%7B%0A++++++++return+1%3B%0A++++%7D%0A%7D%0A%0Aint+owerflow_check_copilot(int+a,+int+b)+%7B%0A++++if(__INT_MAX__+-+a+%3C+b)+%7B%0A++++++++return+0%3B%0A++++%7D+else+%7B%0A++++++++return+1%3B%0A++++%7D%0A%7D'),l:'5',n:'0',o:'C%2B%2B+source+%231',t:'0')),k:50,l:'4',n:'0',o:,s:0,t:'0'),(g:!((h:compiler,i:(compiler:g141,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'1',intel:'0',libraryCode:'0',trim:'1',verboseDemangling:'0'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,libs:!(),options:,overrides:!(),selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+x86-64+gcc+14.1+(Editor+%231)',t:'0')),k:50,l:'4',n:'0',o:,s:0,t:'0')),l:'2',n:'0',o:,t:'0')),version:4
Pripadne skrateny link: https://godbolt.org/z/crT6cP1eP
PS: Share menu je vpravo hore...