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'm sorry I didn't make myself clear. Although the array isn't sorted in the code, the output from the program code listed above shows the following:
High: 50
Index Number: 5
Which caused me to believe (also found in my reading) that the numbers in the array are sorted to find the high number...
I forgot about the code tags - my error.
I incorporated 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]; /*...
I had a directive to create an array, find the largest value, then find the index number of the largest value in the array. I have most of it written, but I'm stuck calcualaing and showing the index. Here is the code so far:
#include <iostream>
#include <cmath>
#include <iomanip>
using...
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...
Here I am again:
This time, I am attempting to create a smiley face (done) with a button that will change the smile 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...
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...
I produce a daily timeline report that reads from 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...
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...
I've gotten much closer - thanks to your help and some more reading to understand the differences in constructors and methods. Now I've hit another point - the amortization table gets to the first line and gives this output:
Payment # Interest Principal Balance...
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.