Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- void (int numeros, int ntermos, float soma)
- {
- int numeros, ntermos;
- float soma;
- numero = 0 ; soma = 2;
- cout <<"\nDigite o numero de termos:" << endl;
- cin >> ntermons;
- for (numero=0; n<=ntermos; numero++)
- if(numero % 2 == 0)
- {
- soma = soma + n + 7;
- else {
- soma = soma + n + 1
- }
- }
- }
- cout <<"\n soma= "<< soma << endl;
Add Comment
Please, Sign In to add comment