Guest User

Untitled

a guest
Aug 17th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include<iostream.h>
  2. void (int numeros, int ntermos, float soma)
  3. {
  4. int numeros, ntermos;
  5. float soma;
  6. numero = 0 ; soma = 2;
  7. cout <<"\nDigite o numero de termos:" << endl;
  8. cin >> ntermons;
  9. for (numero=0; n<=ntermos; numero++)
  10. if(numero % 2 == 0)
  11. {
  12. soma = soma + n + 7;
  13. else {
  14. soma = soma + n + 1
  15. }
  16. }
  17. }
  18. cout <<"\n soma= "<< soma << endl;
Add Comment
Please, Sign In to add comment