This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ddd_workshop | |
import "testing" | |
func TestSelection(t *testing.T){ | |
selection := Selection{} | |
meals := []int{1, 2, 3} | |
selection.AddMeals(meals) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void hanoi(int n,char origem,char destino,char auxiliar){ | |
/*Se sobrar apenas o disco 1, mova fazer o movimento e retornar*/ | |
if(n==1){ | |
printf("\nMova o disco 1 da base %c para a base %c",origem ,destino); | |
return; | |
} | |
/*Mover o n-1 disco de A para B, usando C de auxiliar*/ | |
hanoi(n-1,origem,auxiliar,destino); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void dasDad(){ | |
int i; | |
for(i = 1; i <= 100; i++){ | |
if(i % 5 == 0)printf("Das"); | |
if(i % 7 == 0)printf("Dad"); | |
if((i % 5 != 0) && (i % 7 != 0)) printf("%d", i); | |
if(i != 100)printf(", "); | |
} |