Member Avatar

My requirements are as follows: 1. use main method 2. use the following array- `int[] grades = new int[] {` `82, 70, 99, 90, 92, 75, 87, 85, 91, 100, 91, 87 ` `};` 3. Write code to step through the array of grades and calculate the average grade. Modify your code so that while it is stepping through the grades, it also looks for the minimum grade. Modify your code so that while it is stepping through the grades, it also looks for the maximum grade. **You should only have one loop and work on finding the average, min, …

Member Avatar
0
132
Member Avatar

I need to get the name of the table with the biggest number of rows, I can find the biggest number of rows with function count and than function max, but i don't know how to see from which table is that maximum, can anyone help? tnx

Member Avatar
0
26
Member Avatar

[CODE]import java.util.* public class ArrayMinMax { public static void main(String[] args) { Integer[] numbers={8,2,6,7,1,4,9,5,3}; int min=(int)Collections.min(Arrays.asList(numbers)); int max=(int)Collections.max(Arrays.asList(numbers)); System.out.println("Min number: "+min); System.out.println("Max number: "+max); } }[/CODE] Hi guys, me again. Okay so I use this code in a single array if i want to know what the minimum and maximum numbers are. Now i'm trying to figure out how to implement the same program in a 2d array, with a 3x5 matrix and the user has to input the columns. [CODE]import javax.swing.*; import java.util.*; public class CMPROG2threeXfive{ public static void main(String[] args){ int[][] matrix=new int[3][5]; for(int row=0;row<matrix.length;row++){ for(int col=0;col<matrix[row].length;col++) matrix[row][col]=Integer.parseInt(JOptionPane.showInputDialog …

Member Avatar
0
25
Member Avatar

Hello, I need description about ORA error 26759, i tried to check decumintation for cause or action but with no luck, would anybody help me diagnosing why i saw this error on my 11g Oracle DB. Thank you in advance.

Member Avatar
0
10
Member Avatar

Hi, I have been trying to solve a problem,i need to write code to an existing projectile class to calculate the maximum height reached by a projectile ,i have tried all possible solutions but seem stuck,here is the code below # Canonball in form of a class # projectile.py from math import pi,sin,cos class Projectile: def __init__(self,angle,velocity,height): self.xpos=0.0 self.ypos=height theta=pi*angle/180.0 self.xvel=velocity*cos(theta) self.yvel=velocity*sin(theta) def update(self,time): self.xpos=self.xpos+time*self.xvel yvel1=self.yvel-9.8*time self.ypos=self.ypos+time*(self.yvel+yvel1)/2.0 self.yvel=yvel1 def getY(self): return self.ypos def maxHeight(self,time): self.ypos=self.ypos+time*(4.9*time) return self.ypos def getX(self): return self.xpos def getInputs(): a=input('Enter the launch angle in degrees : ') v=input('Enter the initial velocity in m/s : ') h=input('Enter …

Member Avatar
0
23
Member Avatar

Hello all. I wrote a program that gives me 100 random values from the range between -100 to +100. How am I supposed to find the minimum, maximum, and average of the values that will be listed when I run the program? I appreciate the help anyone can give me. Also, this is for a class and we are not allowed to use Arrays. Thanks again. Here is what I have so far: float random_integer; float lowest=-100.00, highest=100.00; float range=(highest-lowest)+1; for(float index=0; index<100; index++) { random_integer = lowest+float(range*rand()/(RAND_MAX + 1.0)); cout << random_integer << endl; } float sum; float average; …

Member Avatar
0
60
Member Avatar

I tried to use a different forum but I was completely out of my league with the responses. I am extrememly new to python. As a project, I'm supposed to ask the user to input a file name, check that the file exists, output the numbers in the file, and sort them for biggest to smallest. The trick is, I can't use built in functions to do the sorting. I have to use this algorithm: for each i from range(n) for each j from range(n-i) if A[j-1]<A[j] swap(A[j], A[j-1]) Here's what I've been playing with: def main(): try: file=open(input("Please enter …

Member Avatar
0
11
Member Avatar

I have 3 TextBoxes in my Project Form , textbox1 is for taking Maximum_Marks, TextBox2 is for Minimum_Marks and the textbox3 is for taking Obtained_Marks ,but i dont want my Obtained_Marks textbox should take value Greater than Maximum_Marks textbox1 value or Less Than Minimum_Marks textbox2 value. i am trying to get a guidance on it

Member Avatar
0
3
Member Avatar

The code below compares three numbers and it prints out the Maximum and Minimum value, let me hope it will rescue somebody :) import java.util.Scanner; public class MaxMin { public static void main(String args[]) { int w,x, y; System.out.println("\n\nTHE PROGRAM BELOW CALCULATES AND OUT PUTS THE MAXIMUM AND MINIMUM OF THREE DIFFERENT MARKS OBTAINED"); System.out.println("\n\nTHE PROGRAM HAS BEEN PRODUCED FOR THE JAVA ASSIGNMENT GIVEN BY MR GOLOOBA RONALD"); System.out.println("\n***********************************************************************"); System.out.println("\n Enter Your first value: "); Scanner in = new Scanner(System.in); w = in.nextInt(); System.out.println("\nEnter Your second value: "); x = in.nextInt(); System.out.println("\nEnter Your third value: "); y = in.nextInt(); if …

Member Avatar
0
3
Member Avatar

I'm trying to write a program that will ask the user to input the number of values he wants, prompt him for the values and then print out the maximum value and the minimum value. This is what I have so far: count=1 echo "Enter number of integers" read n while [ $count -le $n ] do echo "Enter integer" read x current=$x if [ $current -gt $x ]; then max=$current fi if [ $current -lt $x ]; then min=$current fi done echo "Max value is $max" echo "Min value is $min"

Member Avatar
0
7
Member Avatar

hello! i want to know about maximum mysql strength, that how many users can login and use database at same time. waht is the maximum size of table and maximu rows in table. what are the security risks and how can i overcome on security risks. and how can i make better and running mysql system. What kind of a system required for running online shopping site for massive range of users. also describe most preffered softwares. kindly reply asap.

Member Avatar
0
2
Member Avatar

hi, i tried to installed wamp to my windows vista during installation i got error MSVCR100.dll .??i dont know how to clear . any one can you help me. Thanks

Member Avatar
0
2
Member Avatar

Hi, On windows, i don't see a maximum button on my JDialogs and this is fine, but on a Mac I have this dialog that people can keep up and use other windows, but you can also maximize a dialog on a mac apparently. There is a maximum button. At a point in the program I need to know if the dialog is maximized or not. I tried isMaximumSizeSet() seeing if it was true ( this inherited from JComponent), but my routine still executes which means to me it's not the right call for this. How do i tell if …

Member Avatar
0
2
Member Avatar

Hi, I'm looking for with some pascal code. I have to make a program which allows you to input a name and an amount four times. Then it is supposed to output the name, three percentages of the amount and the maximum of one of the percentage out of the four outputted results. can any one help? This is what I have so far: [CODE]program grocery; uses wincrt; var Name:Array[1..4] of String; Amount:Array[1..4] of longint; i:Integer; B_sector,L_sector,V_sector:double; Begin For i:=1 to 4 do Begin; Writeln('Enter Organisation Name'); Readln(Name[i]); Writeln('Enter the amount'); Readln(Amount[i]); B_sector:=(Amount[i])*40/100; V_sector:=(Amount[i])*25/100 ; L_sector:=(Amount[i])*35/100 ; Writeln(Name[i]); Writeln(B_sector:2:1); Writeln(V_sector:2:1); …

Member Avatar
0
4
Member Avatar

Uhm. Well i am really not well equipped with jquery knowledge therefore giving me the complete code would be the solution. =] The function will be 1.get the 70% width of the browser's screen. 2.convert that width into its corresponding px value 3.set the max width of the #mainContainer using the value got from the conversion/calculation. Need help thanks. here is the css style for the container i want to set max-width with. [CODE] #mainContainer { background-image:url(bg3.jpg); background-repeat:repeat; background-color:#999; width:70%; padding:0; min-width:940px;/* 940px absolute value of 70%. * margin:0 auto; min-height:100%; /*serves as a divider from content to the main …

Member Avatar
0
3
Member Avatar

I want to make a program that asks to enter number. The program will keep asking for entering number until the user enters -99. And when the program finishes, it will give the number of counts, max, 2nd max, min, and 2nd min. The program I made works for all except when I insert only two inputs containing one positive number and one negative number. (e.g. -12 and 89) When I do that, it gives correct max, min, and min2, but 2nd max gives some random number. How can I fix it? ------------------------------------------------------------------------------------------- [CODE]#include <iostream> using namespace std; int main() …

Member Avatar
0
5
Member Avatar

Is it possible to set the maximum memory windows can use via command line. This option is very easily changed through the GUI as seen [URL="http://www.sevenforums.com/tutorials/66482-memory-set-maximum-amount-used-windows-7-a.html"]in this tutorial[/URL] I can't seem to find any examples online without running into something similar to the tutorial provided above. My target device is windows 7. Thanks

Member Avatar
0
2
Member Avatar

I just need a help regarding this problem: a user is asked to enter two fractions, and the program should print the following -maximum -sum -product Output should be in proper fractional from and should be in lowest terms. The program must be able to identify if the numbers entered for numerator or denominator are not integers and output “not valid”. This is also the case if the number 0 is entered denominator I had the program fragments but I'm messed up with placing the fragments in their proper position. I used n1, d1, n2, d2 to represent the four …

Member Avatar
0
3
Member Avatar

Hello, I'm having a small problem with my program for assembly. I have to write an assembly language that finds the maximum of y = x^6 – 14x^2 - 56x for the range -4 ≤ x ≤ 6, by stepping one by one through the range. Here is my code in macro: [CODE]/* Constants*/ define(a2,56) define(a1,14) /* x and y variables*/ define(x_r, l0) define(y_r, l1) define(xmax,l2) define(ymax,l3) .global main main: save %sp, -96, %sp mov -4, %x_r !This line initializes -4 .global loop loop: cmp %x_r,7 bge done mov %x_r, %o0 ! Compute x^6 mov %x_r, %o1 call .mul nop …

Member Avatar
0
2
Member Avatar

[CODE]std::vector<std::vector<unsigned long> > matrix(15); // 15 rows typedef std::vector<std::vector<unsigned long> >::iterator it_type; it_type row = matrix.begin(); for (int w=0;w<10;w++) { //some lines of code unsigned long num = x.to_ulong(); cout <<"Decimal form is: " << num<< end; // if we've hit 15 items in the current row (i.e. 15 columns), then shift to the next row if (row->size() == 15) ++row; // add this to the next column in the current row row->push_back(num); } // resize the last row row->resize(15); // this will ensure that there are 15 columns in the last row for(size_t i=0; i < matrix.size(); ++i) { …

Member Avatar
0
3
Member Avatar

Can anyone advise what is the maximum number of text link ads to have on our <snip> [B]Home Page[/B] without going down in page rank? As of now we have a Page Rank of 4 and our Alexa rating is 285,000.

Member Avatar
0
8
Member Avatar

Hello all, I have a question. You see i have a file which contains data in this format: index 388.315813 index 311.214286 syndrome 289.708333 factor 184.246753 loss 168.578313 index 451.123455 factor 321.676544 What i want to do is to read every line and print it. However if i encounter the same word again (which is in the above case, "index") i want to print the word as well as the max number that has been read. how can i do that? So far i ve written this piece of code. [CODE]word='' cvalue='' for line in open('example.txt','r'): words=string.split(line) wordcount=len(words) if wordcount …

Member Avatar
0
11
Member Avatar

Hey all, i am currently working on a system that detect the value input and carry out an action is the value is accepted but rests everything when the value is denied. i have an algorithm but i don't seem to be able to transfer it into coding. Start. Set x as intiger Set y as integer Set z as integer z = y - (value (which i will have to calculate)) value input is equal to x. y is the maximum value z is the minimum value y increases as x increases (in other words y = x), but …

Member Avatar
0
2
Member Avatar

I get the following message when executing a stored procedure. [COLOR="Red"]The query has exceeded the maximum number of result sets that can be displayed in the results grid. Only the first 100 result sets are displayed in the grid.[/COLOR] However , i cannot change the fact that the SP uses a cursor. Basically what happens is that the SP executes into a declared table, and then for each row it executes a new stored procedure bringing the number of result sets to about 20 000.... Any advice on where i can change this setting ? Regards,

0
1

The End.