fork download
  1. using System;
  2.  
  3. class Quadronacci
  4. {
  5. static void Main()
  6. {
  7. long [] array;
  8. long array[0]=long.Parse(Console.ReadLine());
  9. long array[1]=long.Parse(Console.ReadLine());
  10. long array[2]=long.Parse(Console.ReadLine());
  11. long array[4]=long.Parse(Console.ReadLine());
  12. int row = int.Parse(Console.ReadLine());
  13. int col = int.Parse(Console.ReadLine());
  14. long next=0;
  15. long sum = 0;
  16.  
  17.  
  18. for(int i=1;i<row;i++)
  19. {
  20. for(int j=4;j<col;j++)
  21. {
  22.  
  23. array[j]=array[j-1]+array[j-2]+array[j-3]+array[j-4];
  24. Console.Write("{0,1}",array[j]);
  25.  
  26. }
  27. Console.WriteLine();
  28. }
  29.  
  30. }
  31. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
3
4
2
8
compilation info
prog.cs(8,14): error CS0128: A local variable named `array' is already defined in this scope
prog.cs(8,19): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(9,14): error CS0128: A local variable named `array' is already defined in this scope
prog.cs(9,19): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(10,14): error CS0128: A local variable named `array' is already defined in this scope
prog.cs(10,19): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(11,14): error CS0128: A local variable named `array' is already defined in this scope
prog.cs(11,19): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
Compilation failed: 8 error(s), 0 warnings
stdout
Standard output is empty