View Code of Problem 1

#include<stdio.h>
int main()
{
  int A,B:
  scanf("%d %d",&A,&B);
  printf("%d %d",A,B);
  return 0;
}
/*
Main.cc: In function 'int main()':
Main.cc:4:10: error: found ':' in nested-name-specifier, expected '::'
   int A,B:
          ^
Main.cc:4:9: error: 'B' has not been declared
   int A,B:
         ^
Main.cc:5:8: error: qualified-id in declaration before '(' token
   scanf("%d %d",&A,&B);
        ^
Main.cc:6:20: error: 'B' was not declared in this scope
   printf("%d %d",A,B);
                    ^
*/

Double click to view unformatted code.


Back to problem 1