0_0_15713045_19245.cpp:4:13: error: variable or field 'swap' declared void
void swap(U int &a,U int &b)
^
0_0_15713045_19245.cpp:4:11: error: 'U' was not declared in this scope
void swap(U int &a,U int &b)
^
0_0_15713045_19245.cpp:4:20: error: 'U' was not declared in this scope
void swap(U int &a,U int &b)
^
0_0_15713045_19245.cpp:11:9: error: 'U' was not declared in this scope
int gcd(U int a,U int b)
^
0_0_15713045_19245.cpp:11:17: error: 'U' was not declared in this scope
int gcd(U int a,U int b)
^
0_0_15713045_19245.cpp:11:24: error: expression list treated as compound expression in initializer [-fpermissive]
int gcd(U int a,U int b)
^
0_0_15713045_19245.cpp:12:1: error: expected ',' or ';' before '{' token
{
^
0_0_15713045_19245.cpp: In function 'int main()':
0_0_15713045_19245.cpp:3:18: error: 'U' was not declared in this scope
#define unsigned U
^
0_0_15713045_19245.cpp:19:2: note: in expansion of macro 'unsigned'
unsigned int n,i,a,b;
^
0_0_15713045_19245.cpp:20:20: error: 'n' was not declared in this scope
while(scanf("%d",&n)==1){
^
0_0_15713045_19245.cpp:21:15: error: 'a' was not declared in this scope
scanf("%d",&a);
^
0_0_15713045_19245.cpp:22:7: error: 'i' was not declared in this scope
for(i=2;i<=n;i++){
^
0_0_15713045_19245.cpp:23:16: error: 'b' was not declared in this scope
scanf("%d",&b);
^
0_0_15713045_19245.cpp:24:19: error: 'gcd' cannot be used as a function
a=(a*b)/gcd(a,b);
^
|