Relative Content

Tag Archive for c#logic

c++ fill the missing line

#include <iostream> using namespace std; void printValues( //code here ) { cout<<val1<< ” ” << val2 <<endl; } int main() { printValues(10, 20); printValues(30, “helloworld”); printValues(2.5, 23.14); return 1; } how to implement these code successfully, constraint is only you allowed to enter the code in printValue arguments. using c++ c++ logic New contributor Krishnamoorthy […]

Why does this loop always returns 0 as first element?

I’m trying to make afunction that gets the first pair of prime numbers within a gap.
I started by creating a vector and setting the size of it to the difference between ‘m’ and ‘n’.
However i leeep runing into this problem. The first element of the vector is always ‘0’ when it should be (in this example) 3 (and the last number 7).