fork download
  1. #include <iostream>
  2. #include<stdio.h>
  3. using namespace std;
  4.  
  5.  
  6. void main()
  7. {
  8. int n,j;
  9.  
  10. cout<<"Enter the numbers";
  11. cin>>n;
  12. float A[20], B[20];
  13.  
  14. for(i =0; i< 20; i++)
  15. {
  16. cin>>A[i];
  17. B[i] = A[i]*n;
  18.  
  19. }
  20.  
  21. for(j=0; i<20; j++)
  22.  
  23. {
  24.  
  25. cout<<A[i]<<"*"<<n<<"="<< B[i]<<"\n";
  26.  
  27. }
  28.  
  29.  
  30. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:6: error: '::main' must return 'int'
prog.cpp: In function 'int main()':
prog.cpp:14: error: 'i' was not declared in this scope
stdout
Standard output is empty