Yahoo Web Search

  1. /* Program to find first n prime numbers */ #include<stdio.h> #include<...for prime number and find //till count doesn't becomes equal to n for(m=2;count!= n ;m++) { flag=1; for(i=2;i*i<=m&&flag;i++) if(m...

    1 Answers · Computers & Internet · 14/06/2011

  2. ... * if j =0, and the array is strictly decreasing? * if j = n -1, and the array is strictly increasing? .... but I think the overall approach should work fine. @M

    1 Answers · Computers & Internet · 05/08/2013

  3. ..., I'm not sure if you want to do this for clarity reasons, but your if statements are unnecessarily long. ((( n -( j +k))+k) > j ) && (( n -( j +k))+ j )>k n -( j +k)+k is just n - j , and the ...

    2 Answers · Computers & Internet · 02/08/2013

  4. ...39;); for i = 2:str2num( n ) sum = 0; for j = 1:i/2 if mod(i, j ) == 0 sum = sum+ j ; if sum == i fprintf(''); end end end end fprintf('\ n ') But this will not do anything useful for same reason as your c++ code (triple check it...

    1 Answers · Computers & Internet · 11/06/2008

  5. ...i]= n ; } return; } void compare(int guess[],int answer[],int *exact ,int *inexact) {int i, j ; int found [ N _DIGITS],used[ N _DIGITS]; for(i=0;i<...

    1 Answers · Computers & Internet · 26/02/2013

  6. Lower bound is O(1) - you find it immediately. If you want to know which i, j pairs match, then lower bound is O( n ^2), because you must always search all pairs.

    2 Answers · Computers & Internet · 18/04/2010

  7. ...i]= n ; } return; } void compare(int guess[],int answer[],int *exact ,int *inexact) {int i, j ; int found [ N _DIGITS],used[ N _DIGITS]; for(i=0;i<...

    2 Answers · Computers & Internet · 25/02/2013

  8. ... found at location %d\ n ",num[ j ]); else printf("%d not found , last j was %d\ n ",key, save); } } ps : nice that you are trying this on ...

    1 Answers · Computers & Internet · 21/11/2007

  9. Hi, You were heading in the right direction, but forgot to end the print('*') for i in range (1,6):   for j in range (0,i):     print ('*', end='')   print("\ n ") By the way, if you remove that "\ n " from last print() call you...

    1 Answers · Computers & Internet · 26/08/2013

  10. ...a double for ( j =1; j <= i; j ++){ n = n * j ; } return n ; } } I can't promise you that there aren't some errors in there either, but if it doesn't work on the first try, it should...

    1 Answers · Computers & Internet · 06/10/2012

  1. Try asking your question on Yahoo Answers