Category : expression

#include <bits/stdc++.h> using namespace std; int main() { long int a,b,count=0; cin>>a>>b; for(long int i=1; i<=__gcd(a,b);i++){ if((a%i==0)&&(b%==0)){ count++; } } if(((a%b==0)||(b%a==0))&&(a!=b)){ cout<<count; } return 0; } In function ‘int main()’: 11:20: error: expected primary-expression before ‘=’ token Source: Windows Que..

Read more

I’m reading C++ISO and I got overwhelmed by some information. discarded-value expression: In some contexts, an expression only appears for its side effects. Such an expression is called a discarded-value expression. side effects: Reading an object designated by a volatile glvalue (7.2.1), modifying an object, calling a library I/O function, or calling a function that ..

Read more

I have a mathematical expression such as: expression = function123(v1, v2) and I want to transform it to: expression = (function1(v1, v2) + function2(v1, v2) + function3(v1, v2)) In order to solve this problem, I tried to utilize regular expressions, such as: "function123(([^)]+),([^)]+))" and replace using the interior tokens to get what I want. Regular ..

Read more

I have a mathematical expression such as: expression = function123(v1, v2) and I want to transform it to: expression = (function1(v1, v2) + function2(v1, v2) + function3(v1, v2)) In order to solve this problem, I tried to utilize regular expressions, such as: "function123(([^)]+),([^)]+))" and replace using the interior tokens to get what I want. Regular ..

Read more