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: 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] 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… Re: Find Biggest num Programming Software Development by jephthah … get last element[/quote] because for the smallest, you set num=1000 every single time you go through the loop. arr… less than 1000 each time, so it stores it in num, each time. EDIT: i see William already re-wrote your… Create sentences using random num generation Programming Software Development by Little E …;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."…;, num); printf("\n\n%s %s %s %s %s %s.\… Re: Create sentences using random num generation Programming Software Development by Eko To AncientDragon : the a[num],v[num]... doesn't work,because num is the same in that insant moment(i tried that). …; } [/code] Now,i've deleted the sent string,and the num variable,because u don't need them. I hope the… Re: Find Biggest num Programming Software Development by Ancient Dragon I would have done it slightly different what what William posted -- initialize the value of [b]num[/b] with the first element of the array on line 10, then line 21 of his code could be deleted. Re: Finding smallest prime divider of NUM Programming Software Development by Despairy oh... that sounds right... dohh so i guess this function is enough [CODE]int first_prime(int num) { if (num%2==0) return(2); for (int i=3;i<sqrt(num);i+=2) { if (num%i==0) return(i); } return(num); }[/CODE] cool thanks for that! Re: Create sentences using random num generation Programming Software Development by Ancient Dragon [QUOTE=Eko;283669]To AncientDragon : the a[num],v[num]... doesn't work,because num is the same in that insant moment(i tried that). [/QUOTE] You are right -- my suggestion was not what he wanted. :) Re: Can I make def rotate_word(s,num): more pythonic? Programming Software Development by woooee …[CODE]## substituting ascii_val for ord(letter) + rotate def rotate_word(s,num): rotate = num % 26 newword = ' ' word=s.upper() for letter in word…(ascii_val) return newword ## stripped down it becomes def rotate_word(s,num): rotate = num % 26 newword = ' ' word=s.upper() for letter in word… Re: Create sentences using random num generation Programming Software Development by Ancient Dragon >>sent[num]; what you should do here us use strcpy() to copy the first random string into sent variable, then strcat() to copy each of the other strings. >>printf("\n\n%s %s %s %s %s %s.\n\n", a[i], n[i], v[i], p[i], a2[i], n2[i]); variable i is not a random number. you should use variable num instead of i. Can I make def rotate_word(s,num): more pythonic? Programming Software Development by LanierWexford … take a string(s) and rotate it a given amount(num). i.e cheer rotated by 7(cheer,7) will return… suggestions?? Thanx in advance! Lanier [code=python] def rotate_word(s,num): rotate = num % 26 newword = ' ' word=s.upper() for letter in word… Re: reverse num help... Programming Software Development by Fbody …;a<15;a++){ cout<<"enter value num #:"<<a<<endl; cin>>… Finding smallest prime divider of NUM Programming Software Development by Despairy … the following : [CODE] int first_prime(int num) { for (int i=2;i<sqrt(num);i++) { if (num%i==0) { if (isprime(i… Re: can long long stor 12 dig num?ifno, without array how 2 do? Programming Software Development by Aseem_Pandey …<iostream> using namespace std; int main() { long long num=600851475143,large,k,i; for(i=2;;++i) { k=i…; if(num%i==0) { num/=i; i=k-1; large=k; } if(num==1) break; } cout<<… User put any num so program print nxt ten num Programming Software Development by RJ Adeel My q is user put any num so program print out nxt ten num RAND() num game Programming Software Development by elliotell333 …;Yes" || "yes") { system("CLS"); int num = rand(); int Guess; cout << "READY?"; cin… BETWEEN 1 --- 25. "; cin >> Guess; if ( Guess == num ) { system("ECHO YOU WIN! "); system("COLOR B… Re: can long long stor 12 dig num?ifno, without array how 2 do? Programming Software Development by Aseem_Pandey … a long long int, can simple method, long long num; cin>>num; will do or not ?? and suppose we use… Toggle caps, num or scroll lock Programming Software Development by mrb260478 [FONT=Courier New]I want to toggle caps, num or scroll lock using c++ program on a unix machine. Can some one help? Caps/Num/Scroll lock lights blinking, keyboard doesn't work Hardware and Software Microsoft Windows by marcus4309 … (yes the keyboard and mouse are both detected), the Caps/Num/Scroll lock keys all continuously flash in unison (about once…