Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Somatorio(int n)
- {
- int i;
- i=0;
- for (i=0,i<=n,i++)
- {
- i=i+i;
- }
- return i;
- }
- void LePositivo(int N)
- {
- int resultado,i;
- i=0;
- do
- {
- printf("Digite um numero: ")
- scanf("%d", &N)
- resultado = Somatorio(N);
- printf("O resultado eh igual a %d", resultado);
- i++
- } while (i<=5);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement