Re: Input an Array then Find sum of digits and num of digits Programming Software Development by Narue >num[a] = num[a] = '0'; = is not the same as -. One is assignment, the other is subtraction. This is the line you want that will give you the correct sum: [code] num[a] = num[a] [B][I][COLOR="Red"]-[/COLOR][/I][/B] '0'; [/code] Python program for prime numbers. can you help me out with continue loop? Programming Software Development by Johnny Blaz … number: ")) if num==0 or num<0: continue else: if num > 1: if (num % i) == 0: print(num,"is not a… number") print(i,"times",num//i,"is",num) break else: print(num,"is a prime number") Re: What am I doing wrong. Programming Software Development by Salem …'s ONE) int, and initialises it to size. Compare with num = new int [COLOR="Red"][[/COLOR] size [COLOR="… Re: New to functions =) Programming Software Development by Sturm >Num goes in here?? If num goes there, why did you pass [inlinecode] b [/inlinecode], an uninitialized variable with a random value? Re: Help! Help!help! Help!! Programming Software Development by John A > *num=get4ints();[COLOR=#0000ff] [/COLOR]Your program doesn't make any … Re: Why break doesn't work? Programming Software Development by Sodabread Num is never going to equal 0 once you start adding… variable to int.Parse(Console.ReadLine()) then add it to num after checking if it's 0. [CODE] for (int i… int x = int.Parse(Console.ReadLine()); if (x == 0) break; num += x; counter++; } [/CODE] Re: What does this condition mean? Programming Software Development by mrnutty "num-65" : it subtracts 65 from num. Re: help? Programming Software Development by TrustyTony num is not set to any value in your program. it is type of file of integer so you are supposed to open one file in your main code and close it at end of it like you do in one of the procedures. Re: Need some help with this java program..Stuck Programming Software Development by Akill10 num is declared as a double. You are trying to read in nextInt(). Change to scan.nextDouble(). Re: [hekp] display multi image from 1 php file Programming Web Development by urtrivedi $num = "/webroot/imagerfoldername/".$files[$i]; Re: PHP & HTML output Programming Web Development by adam.adamski.96155 `$num=mysql_numrows($result)` is wrong, it should be: ` mysql_num_rows($result);` How strange that the script tests that $query exists (which is a string that is defined the previous line), then sends the query to the DB without any error checking: `$result=mysql_query($query);` Re: convert string to int array Programming Software Development by mrnutty " num.at(i) " num is an integer and not an array. This does not …[4] = {0}; int num; cin >> num; int i = 0; while(num) { digits[i] = num%10; //get the last digits num /=10; //remove the… not tested, I think that will extract the digits from num into an int array. Then you can convert it into… Re: simple C++ program of prime numbers Programming Software Development by creative_m num 2 and 3 are primes if num mod 6 = 1 or num mod 6 = 5 it is possible to be a prime. or the number is a result of ( prime num * another prime num ) otherwise it is not a prime number. i hope this will help you. Re: function Programming Software Development by Moschops `num==a;` This means "is the value of `num` the same as the value of `a`?" It does not change the value of `num`. Perhaps you're trying to set the value of `num`? Did you mean `num=a;` ? Re: Sorting Programming Software Development by Adak …, so bubble function can access it already. Don't pass num[] to the bubble function. BUT length is not a global… to bubble function. Give it the number of floats in num[], or it's useless. So your bubble prototype is: void… Re: Finding the value of a digit Programming Software Development by Ancient Dragon >>num = number / (10^n-1); you have to use pow() function [icode]num number / pow(10,n)-1;[/icode] The problem with that is if pow() returns 1 then the formula will get a divide by 0 error. Re: Pointers to strings Programming Software Development by Aia num = fread(buff, 1, 1, myFP) [COLOR="Red"]- 48[/COLOR]; remove the -48 from it. feof() function as the exit condition for a loop is not good. Read more [URL="http://www.gidnetwork.com/b-58.html"]here[/URL]. Re: Quadratic equation - formula method - how to not get answer in decimals Programming Software Development by m4ster_r0shi > `num = ((-b) + sqrt(b*b-4*a*c))` > `den = (2*… num/caps/scroll lock flashing lights Hardware and Software Hardware by geekwannabe08 When I shut down my computer, the num/caps/scroll lock lights on my keyboard flash on & … keyboard as well). when the computer is on, only the num lock light is on as usual. Please help! Thanx!! Re: Can I make def rotate_word(s,num): more pythonic? Programming Software Development by jrcagle … is like this: chr(ord(c) - 65 + num) % 26 + 65 It subtracts the ord('A') to…quot;] def rotate_word2(s, num): s = s.upper() rotate = lambda c, num: chr((ord(c) - 65 + num) % 26 + 65) …ord('a')) else: return c def rotate_phrase(s,num): new_letters = [rotate_letter(x,num) for x in s] return ''.join(new_letters… Re: Find Biggest num Programming Software Development by MrNoob … 0 int FindBiggest(int *arr,int choice) { int i; int num=0; for(i=0;i<3;i++) { if(choice…){//find BIGGEST NUM if(arr[i]>num) num=arr[i]; } else { num=1000; if(arr[i]<num) num=arr[i]; } } return num; } int main… Input an Array then Find sum of digits and num of digits Programming Software Development by ollie335 … Heres what i've got so far int main() { char num[100]; cout << "\nEnter Number: "; … = 0; for (int a = 0; num[a] != '\0'; a++) { num[a] = num[a] = '0'; sum += num[a]; } cout << sum; return… Find Biggest num Programming Software Development by MrNoob …int *arr,int choice) { int i; int num=0; for(i=0;arr[i]<=sizeof arr;…i++) { if(num<arr[i]) num=arr[i]; } return num; } int main(void) { int…then after that we check with the if num<array[i] whish ofcourse it is …now it we set the num to array[i] untill there no we found… Re: Find Biggest num Programming Software Development by MrNoob ….h> int FindBiggest(int *arr) { int i; int num=0; for(i=0;arr[i]<=3;i++) { if…(arr[i]>num) num=arr[i]; } return num; } int main(void) { int arr[]={0,5,…(); return 0; } [/code] now ofcourse 1st num is bigger than 0 whish should set num to 5 whats wrong now :S? Re: Find Biggest num Programming Software Development by William Hemsworth … FindBiggest(int *arr, int length, int choice) { int i; int num = 0; if ( choice == Biggest ) { for (i = 0; i < length…; length; i++) { if ( arr[i] < num ) { // Look for a smaller value num = arr[i]; } } } return num; } int main(void) { int arr[] = {2… Can not find symbol num=MyInput.readInt(); Programming Software Development by atunio …JDK1.7 there is error: Can not find symbol num=MyInput.readInt(); i don't understand what is …public static void main(String[] args)throws Exception { int num; System.out.println("Enter a number between 10 and… 20:-"); num=MyInput.readInt(); if(num>10 && num<20) {System.out.println… Re: Find Biggest num Programming Software Development by William Hemsworth …="Red"]int length[/COLOR][/B]) { int i; int num = 0; for (i = 0; [B][COLOR="Red"]i… < length[/COLOR][/B]; i++) { if ( arr[i] > num ) num = arr[i]; } return num; } int main(void) { int arr[] = {0, 5, 3… Re: Find Biggest num Programming Software Development by MrNoob …;stdio.h> int FindBiggest(int *arr) { int i; int num=0; for(i=0;i<3;i++) {//used to…;array[i<3;i++) if(arr[i]>num) num=arr[i]; } return num; } int main(void) { int arr[]={0,5,3… reverse num help... Programming Software Development by top123 …[a]; } for (int b=0;b<15;){ num=checknum[b]; for(int c=0;c<15;){ if…loop cout<<position<<endl; displaynum[position]=num; b++; position=0;} cout<<"Number are… Re: Create sentences using random num generation Programming Software Development by CPLUSCPLUS …;town", "car"}; char sent[35] = {0}; int num = rand(); int i = 0; srand(time(NULL)); for( i = 0…; i <= 4; i++){ num = 1 + rand() % 5; sent[num]; printf("\nThe random number is %d."… number at all to print the data, and your sent[num] is not used for anything. What is it for? To…