remote server not responding on my nokia 208

Member Avatar
Member Avatar
+0 forum 2

I need to output the smallest number that is entered. I can't seem to figure out how to do it though. Thanks in advance. small.cpp #include <iostream> #include <algorithm> #include "arrayListType.h" using namespace std; int main() { arrayListType<int> intList(100); // int min(int first, int last); int counter; int number; cout<< "Enter 5 integers: "; for (counter = 0; counter < 5; counter++) // Use of for loop to enter intListinsertat { cin >> number; intList.insertAt(counter, number); } cout << endl; cout << "The list you entered is: "; intList.print(); cout << "The smallest number is: "; intList.print(); cout << endl; …

Member Avatar
Member Avatar
+0 forum 11

Dear All, I have written a program to find the smallest divisor of an input number. The code gives me an error in lines 19 and 23. The error is invalid operands to binary %. Please help me to troubleshoot, thank you. Below is my code: #include<stdio.h> #include<stdlib.h> #include<math.h> int main() { int n,r,sdivisor; double d,sqroot,comp; printf("Enter the number whose smallest divisor has to be found"); scanf("%d",&n); if(n%2==0) { printf("the smallest divisor is 2"); } else { sqroot=sqrt(n); d=3; } comp=n%d; while(comp!=0 & d<sqroot) { d=d+2; comp=n%d; } if(comp==0) { sdivisor=d; } else { sdivisor=1; } system("pause"); return 0; } …

Member Avatar
+0 forum 0

I'm working on a program that takes 5 integers from input and then prints out the smallest and second smallest of those integers. The program correctly outputs the smallest number but the program often outputs the second smallest number incorrectly because of ordering. For example, if I enter 33, -6, -15, 0, and 12, the program will print -15 as the smallest and -6 as the second smallest. If however, I enter 3, 6, 7, 8, and 9, the program outputs 3 as the smallest and instead of outputting 6 as the second smallest, I get garbage for the second …

Member Avatar
Member Avatar
+0 forum 4

how do you promt the program from positive integars terminatd by -1 .. and then ask for smallest of these integars. I did everything except when I add (!= EOF) .. It shows the same prompt multiple times should I still keep the code or is there a specific error? [ICODE] #include <stdio.h> int main (void) { int n, smallest, i=1; while (n != EOF) { printf ("Enter a list of positive integars: ",i); scanf ("%d", &n); if (n<=smallest) smallest=n; i++; } printf("The smallest of these integars is %d.\n "); return (0); } [/ICODE]

Member Avatar
Member Avatar
+0 forum 3

Hello, I am trying to write a MIPS program that uses a function call to return the index of the smallest character within an array. I have my code set up in a way I thought would be correct, but when I try to test it seems to not even be close to working. The function takes two parameters from main: $a0 = the address of the phrase $a1 = the address of the last non nul character Here is my code: [CODE] .text findSmallPos: addiu $sp, $sp, -24 # allocate stack space -- default of 24 here sw $fp, …

Member Avatar
+0 forum 0

The trend in recent years has been from smartphones to get bigger screens and slimmer profiles, with everyone pretty much following where the Apple iPhone leads them. Until now, that is, with Nokia breaking free from the constraints of a huge touchscreen and apparently opting for a tiny candy-bar design instead. Ladies and gentlemen, presenting what looks like being the world's smallest smartphone: the Nokia C5. The folks over at DailyMobile are claiming something of a scoop with what appear to be a whole bunch of [URL="http://dailymobile.se/2010/02/03/nokia-c5-leaked-pictures-of-a-new-symbian-s60-device-from-nokia/"]leaked photos[/URL] of the as yet unreleased Symbian S60 candy-bar smartphone, the Nokia C5. …

Member Avatar
Member Avatar
+0 forum 2

The End.