Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void listNumbers(int start, int end){
- /*in questo caso devo stampare tutti i numeri compresi tra start ed end,
- * faccio finta che siano due indici e quindi parto da start, lo stampo,
- * e rifaccio la stessa cosa per start+1, fino a quando start non raggiunge end.*/
- if(start<=end){
- printf("%d", start);
- listNumbers(start+1,end);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment