victorialais

VETOR MULT DE 5 1-500

Jun 3rd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6.  
  7.  
  8. int main () {
  9. int vetor[100];
  10. float a=0;
  11.  
  12.  
  13.  
  14. while (a<101) {
  15.     a++;
  16.  
  17.     vetor[100]=(1*a*5);
  18.    
  19.  
  20.  
  21.  
  22.         cout << vetor[100] <<"\n";
  23.  
  24.  
  25. }
  26.  return 0;
  27. }
  28.  
  29.  
  30.  
  31. /* CASO QUEIRA COMEÇANDO DO 1:
  32.  
  33. #include <iostream>
  34. #include <math.h>
  35.  
  36. using namespace std;
  37.  
  38.  
  39.  
  40. int main () {
  41. int vetor[100];
  42. int a=0;
  43.  
  44.  
  45.  
  46. switch  (a) {
  47.     case 0:
  48.         vetor[100]=1;
  49.         cout << vetor[100] << "\n";
  50.         a++;
  51.         while (a<101)
  52.         {
  53.             vetor[100]=(1*a*5);
  54.         cout << vetor[100]<<"\n";
  55.         a++;}
  56.         break;
  57.        
  58.     case 101:
  59.     break;
  60.  
  61.  
  62.  
  63.  
  64. }
  65.  return 0;
  66. }  
  67.  
  68. */
Advertisement
Add Comment
Please, Sign In to add comment