cpjust,
if (dollars[x] > high)
{
high = dollars[x];
IndNum = x;
}
gives me the position number of 0 in the array. The LinearSearch() function searches for the variable 'high' to see where it is in the array. Once it finds it, it stops looping through the array and returns the position...
...I found I needed to do a linear search of the array. My finished code:
#include <iostream>
using namespace std;
int LinearSearch(const int *Array, const int Size, const int ValToSearch)
{
bool NotFound = true;
int i = 0;
while(i < Size && NotFound)
{
if(ValToSearch != Array[i])...
...your suggestions and it worked. The current code:
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
/* declare array */
int dollars[6] = {25, 30, 50, 20, 15, 25};
int high = dollars[0]; /* assign first element value to high */
int...
...and showing the index. Here is the code so far:
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
/* declare array */
int dollars[6] = {25, 30, 50, 20, 15, 25};
int i;
int high = dollars[0]; /* assign first element value to high */
int...
I did read the information on the IsEmpty Function, however I apparently misinterpreted how it should be used. My mistake.
I decided to change from using an ActiveX checkbox to using the checkbox from the Forms toolbar as I don't need all of the functionality of an ActiveX object. I copied the...
I am working on a workbook and I want to use an checkbox control to be checked off on each sheet when the worksheet is completed. However, there is one merged cell (d15 -k15) on each sheet that needs to be filled in with text before the sheet can be considered complete. I tried using this code...
I am working on a workbook and I want to use an checkbox control to be checked off on each sheet if the form is completed. However, there is one cell on each sheet that needs to be filled in with text before the sheet can be considered complete. I tried using this code attached to an ActiveX...
...from a frown (my problem). I believe I'm almost there, but I'm missing something that is probably relatively simple...
My code:
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class SmileFace_me extends Applet implements ActionListener {
Button moodChange = new...
I mean the conditional formatting does not apply itself. However, when I step through the macro, it works - am I missing something or should I run this portion of code as a separate macro?
I submitted a question pertaining to conditional formatting that was answered in this thread:
thread68-819125. When I do this manually, it works like charm. However, when I try to incorporate this method into an existing macro, it does nothing. Here is the code it is a part of (inserted code in...
I do not have manager access. I only have editor access with these rights: Create documents, Read public documents, Write public documents, Replicate or copy documents.
Do I have any other options? Some other facts:
I am a telecommuter, so I seldom go into the office. This database contains...
When I try to open the database in Designer, it tells me that I don't have sufficient rights to the db. Does this mean that I won't be able to restrict the view refresh?
I created several private views from a Notes db so that I can update a daily report by just glancing at a view and not opening every record. Every couple of months, Notes Admin does a db refresh and my private views disappear with the old version of the db. Isn't there a way to keep my private...
...dates and times from another worksheet in the report. The formula that I use to create my ‘timebar’
=IF(AND(E$1>=($C2-TIME(0,0,1)),E$1<=ROUND($D2*24/0.25,0)*(0.25/24)),"P","")
Row 1 holds the value for each hour of the days I am currently working on.
Col C holds the start date/time of the...
You guys are the best! It is functioning properly - now I have to get the pause that was working before to work again. I tried to give all of you stars for helping me out. Prosper, for some reason it won't let me give you one, but I will try again later!
Not imperative, but if you could help me...
I created two macros in Excel 2000 that hides and unhides rows that do not have shading in them and they are assigned to a toggle button. However, when the same macro is executed in Excel 97, users get a Runtime 1004 error that says "Unable to set the Hidden property of the Range class." Here is...
...= new MortgageCalculator();
value.doCalculation(principal, interestRate[i], termInMonths[i]);
}
}
}
MortgageCalculator:
import java.io.*;
import java.text.NumberFormat;
public class MortgageCalculator {
//formula that calculates monthly payment
public MortgageCalculator...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.