Hi Friends. i am working on my internal work. i am having n dynamic rows, Each and every row contain total. i want to sum all the rows total. i have attached the screen shot for the reference

Member Avatar
Member Avatar
+0 forum 9

I am trying to display scores by what the user is requesting either 'Average','Total',or 'Both'. The following is my code for the loop_tester.php and below that is the code for my index.php. I am trying to add a switch statement to the index.php file that will sets values for only the average calculation if the user selected the "average" radio button, only the total calculation if the user selected the "total" radio button, both the average and total if the user selected the "both" button. After the user puts in the scores and then selects either 'average','total','both' it should display …

Member Avatar
Member Avatar
+0 forum 3

Create a form that accepts scores from the user, displays the total, count, and average of the scores, and displays a dialog box that lists the scores.This application should check the number entered by the user to make sure it is a valid integer from 0 to 100. If a value is entered outside this range, the score does not count (and should not be included in the score total, score count, or average). Here's What I have: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Text.RegularExpressions; namespace Scores { public …

Member Avatar
Member Avatar
+0 forum 6

I have a cart that shows product selected and the quantity and the price for each. What I am wondering is how to display the price for each as well as the total for all? Here is my code...Is there a way to do this in the public string Display()...what I am trying dosesn't work. I am tring to get the output of Product.Name (2 @ $79.99 each), to look like Product.Name (2 @ $79.99 each = $159.98) public class CartItem { public CartItem() {} public CartItem(Product product, int quantity) { this.Product = product; this.Quantity = quantity; } public Product …

Member Avatar
Member Avatar
+0 forum 1

hello sir, i have php code to display the following details. Total size : 1.9 MB No. of files : 15 No. of directories : 2 but i need to do this by database because i am displaying links from database. so how it is possible. any suggestions please......... thank you..... how to display

Member Avatar
Member Avatar
+0 forum 8

![7d2f0b828b7075213b3cc4ce79ce21d1](/attachments/large/4/7d2f0b828b7075213b3cc4ce79ce21d1.png "7d2f0b828b7075213b3cc4ce79ce21d1") i have 2 database listview1(from tbl_storage) listview2(fromsales) so i want my listview items and subitems to be increment or be loop correct me if im wrong with that. sellingprice and Qty.(Quantity) ex. itemno | name | qty| price | total | 1 | a | 1 | 100 | 100 | 1 | a | 1 | 100 | 100 | it should be looking like this 1 | a | 2 | 100 | 200 | i want to loop it so when i add the same item it wont duplicate in listview2 here's my whole code: …

Member Avatar
Member Avatar
+0 forum 2

Friends, Please help me I have a form having 3 text boxes of data type number one text box for display- also number type one command button I want to add the figures of the three text boxes my code is as below Private Sub Command1_Click() Dim Total As Long Total = (Text1.Text + Text2.Text + Text3.Text) Text4.Text = Total End Sub When I entered 1 in the first text box, 2 in the second and 3 in the third,on clicking the button I am getting the answer 123 instead of 6 Why this anomaly? please help me.

Member Avatar
Member Avatar
+0 forum 4

Does anybody know how to make a program that calculates your work hours? I tried this code, but it's going all wrong. #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<ctype.h> #include<string.h> #include<time.h> char* timein[5], timeout[5], p; int totaltime, ticktock, hour, minute, rate; FILE* f; int main(){ clrscr(); CreateTimeFile(); GetTimes(); DisplayFinalInfo(); getch(); } CreateTimeFile(){ f = fopen("time.txt","w"); fclose(f); } GetTimes(){ f = fopen("time.txt","a"); printf("\nEnter time in 24-hour format. \nWARNING: An error at any point in the input will result in needing to repeat the process.\nEnter time-in for Monday: "); scanf("%c",&timein); ValidateTimeIn(); printf("\nEnter time-out for Monday: "); scanf("%c",&timeout); ValidateTimeOut(); AppendTimes(); printf("\nEnter time-in for Tuesday: "); scanf("%c",&timein); …

Member Avatar
Member Avatar
+0 forum 9

hello guys i have created the below codes. the first one is the mysql select statement which works fine when i echo. the second one is an html/css table i created. i am stuck to the point where i can merge both of them so that i get a nice display and the total price of the products are calculated in each column. the first code selects product name, retailer name and product price from 5 tables. using the echo codes i can display the records in columns. code for mysql select statement <?php session_start(); include('db_connect.php'); $username = $_SESSION['username']; $user …

Member Avatar
Member Avatar
+0 forum 34

how do add the total of items in listview column and display the result in a text box

Member Avatar
Member Avatar
+0 forum 6

I've been getting problems with my formula to total the deposit and price. I'm getting and error on this line $total += $total + $deposit['deposit'] * $pamount['price_status']; Here's more but only an error with the total. $prod_refid=$_REQUEST['refid']; $productsql="select * from products where prod_refid='$prod_refid'"; $resquery = @mysql_query($productsql); $resproduct_fetch=mysql_fetch_array($resquery); $image_path="products/"; $thumb_path="products/thumb/"; $product_id=$resproduct_fetch['product_id']; $prod_refid=$resproduct_fetch['prod_refid']; $product_image=$resproduct_fetch['product_image']; $product_name=$resproduct_fetch['product_name']; $prod_country=$resproduct_fetch['prod_country']; $price_range=$resproduct_fetch['price_range']; $pamount = number_format($price_range, 2, '.', ''); $price_hour=$resproduct_fetch['price_hour']; $price_hour = number_format($price_hour, 2, '.', ''); $price_week=$resproduct_fetch['price_week']; $price_week = number_format($price_week, 2, '.', ''); $price_month=$resproduct_fetch['price_month']; $price_month =number_format($price_month, 2, '.', ''); //$pamount = number_format(((float)$price_range),2); $deposit=$resproduct_fetch['deposit']; $deposit = number_format($deposit, 2, '.', ''); $prod_userid=$resproduct_fetch['prod_userid']; $prod_usertype=$resproduct_fetch['prod_usertype']; $prod_desc=$resproduct_fetch['prod_desc']; $prod_minduration=$resproduct_fetch['prod_minduration']; $prod_maxduration=$resproduct_fetch['prod_maxduration']; $prod_avail_days=$resproduct_fetch['prod_avail_days']; $prod_paymethod=$resproduct_fetch['prod_paymethod']; $total += $total + $deposit['deposit'] * $pamount['price_status']; $cntry_sql=mysql_query("select country,countrycode,country_abbr from country where countryid ='".$prod_country."' …

Member Avatar
Member Avatar
+0 forum 9

Hi, I'm facing a problem which is can't total up all the subtotal amount. Everytime I add a new product to cart, the total only show the last product that I added into cart. Not only that, when I update the quantity of other product, the total still remain the last product price but when I update the last product quantity, the total will shows the last product updated price. ![problem6](/attachments/large/3/problem6.jpg "problem6") The picture above you can see the total in the cart only display the amount of the latest added product to the cart but not total up the …

Member Avatar
Member Avatar
+0 forum 2

Hi, I'm facing a problem which is can't total up all the subtotal amount. Everytime I add a new product to cart, the total only show the last product that I added into cart. Not only that, when I update the quantity of other product, the total still remain the last product price. ![problem4](/attachments/large/3/problem4.jpg "problem4") The picture above you can see the total only show the amount 21. Any solution? <?php include('./include/config.php'); include('./include/loginverify.php'); ?> <!DOCTYPE html> <!-- Website template by freewebsitetemplates.com --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Artist Website Template</title> <link rel="stylesheet" href="images/css/style.css" type="text/css" charset="utf-8" /> </head> <body> …

Member Avatar
Member Avatar
+0 forum 3

Hello again. I am trying to create a simple code that can compute the average of a set of numbers read in using a scanner. import java.util.Scanner; public class Average { public static void main(String[] args) { double number = 0; double total = 0; int count = 0; Scanner scan = new Scanner(System.in); while (number != -1) { System.out.println("Please enter a non negative number."); number = scan.nextDouble(); total = number++; System.out.println("The total is " + total); count++; } double average = total/count; System.out.println("The average is " + average); } } The loop occurs but it won't end. I wanted …

Member Avatar
Member Avatar
+0 forum 5

Please tell me why it gives me always zero value? [CODE]<?php $total =0; $memid = $_POST['username']; $leg = $_POST['leg']; mysql_connect ("host", "usr", "paswd") or die ('Error: ' .mysql_error()); mysql_select_db ("dbname"); function getTotalLeg($memid,$leg){ $sql="select $leg from `users` where `username`='$memid' "; $res=mysql_query($sql); $row=mysql_fetch_array($res); global $total; $total = $total+mysql_num_rows($res); if($row['$leg']!=''){ getTotalLeg ($row['$leg'],'lname'); getTotalLeg ($row['$lrg'],'rname'); } return $total; } echo $total; ?>[/CODE] Please, solve it. I want to count how much i have in my left or right, sum of total in binary tree.

Member Avatar
Member Avatar
+0 forum 2

I am writing an application which calculates profit from 3 column values. The SQL is as follows in vb dataset designer; [CODE]SELECT ID, Sale - (Weight * 20) * (Rate -5) AS Profit From AgencyRegister WHERE (DatePart('yyyy', ArrivalDate) = ?) ORDER BY ArrivalDate[/CODE] I want to add another column of 'Total' that may display running profit an a separate column. I've tried; [CODE] SELECT a.ID, a.Sale - (a.Rate - 5) * (a.Weight * 20) AS Profit, SUM(b.Sale - (b.Rate - 5) * (b.Weight * 20)) AS Total FROM AgencyRegister a, AgencyRegister b WHERE (DatePart('yyyy', a.ArrivalDate) = ?) AND a.ID = …

Member Avatar
Member Avatar
+0 forum 5

The issues with this program are: 1. File: D:\Unit 3 Data Type, Objects, Assignments\CreditCardBill.java [line: 20] Error: Type mismatch: cannot convert from double to int 2. File: D:\Unit 3 Data Type, Objects, Assignments\CreditCardBill.java [line: 21] Error: Type mismatch: cannot convert from double to int EDIT: I have tried type casting, but I believe you somehow can't go from a double to an int, but instead only the other way is possible. Added a few more variables which I was missing. Say that you owe the credit card company $1000.00. The company charges you 1.5% per month on the unpaid balance. …

Member Avatar
Member Avatar
+0 forum 65

the question asked me make a program that would find opens an read a txt file and calculate or display the following. - the number of numbers - sum of all the numbers in the file (running total) -average of numbers in file the .txt file just has 100,200,300,400,500,600,700 each in its own line one after another. im completly stuck on how to find the second two parts. so far i managed to read the file and get it to show the numbers and give a final count of how many there are using a while loop. but everything ive …

Member Avatar
Member Avatar
+0 forum 2

hh.. how can i get the value accumulated from the date i select from datetimepicker1 to datetimepicker2 in vb.net and mysql? the value here refers to the daily sales and i need to find the total sales between the range dates that i choose.. please help me..as im beginner and my knowledge is limited.. thanks in advance..

Member Avatar
Member Avatar
+0 forum 4

HI Sorry for opening the thread, i have some issue please help me in solving the below one [B]Javascript[/B] [CODE]<script language="javascript"> function line(elem,amt,res_elem) { var qty=document.getElementById(elem).value; var tot_amt=qty*amt; //document.getElementById(res_elem).value = tot_amt; document.getElementById(res_elem).value = Math.round(tot_amt*100)/100; } </script>[/CODE] PHP [CODE] <?php $cate_code=$_GET['ct']; $civrform=$_GET['vrform']; $site=$_GET['site_name']; $desr="select * from site_rate where category_code='$cate_code' AND sitename='$site' order by item_code"; //echo $desr; $r=mysql_query($desr,$conn); $i=1; while($m=mysql_fetch_array($r)) { $item_code1=$m["item_code"]; $prate=$m["bgt_rate"]; $bdata="select sum(curr_qty), sum(curr_amount) from billingdata where item_code='$item_code1' AND site='$site' AND vrform='$civrform'"; //echo $bdata; $bdatar=mysql_query($bdata,$conn); $bdatam=mysql_fetch_array($bdatar); //$thisamt=($prate*$m['thisqty']); $pqty = $bdatam["sum(curr_qty)"]; $pamt = $bdatam["sum(curr_amount)"]; //$uqty = $pqty+$thisqty; ?> <td class="qty"><?php echo $i; ?></td> <td width="250" height="30" class="textinner"><textarea name="item_1" rows="1" readonly="readonly" class="textinner" …

Member Avatar
+0 forum 0

im having this problem when i try to add [CODE] m + 1 = k;[/CODE] it says this- *lvalue required as left operand of assignment* in my compiler, please help. dont mind the unfinished code. [CODE]#include <iostream> using namespace std; int main() { double b, m, k; string x; b = 0.0; cout << " GPA calculator " << endl; cout << " Is your gpa weighted? " << endl; cin >> x; while(x == "yes") { cout << " Enter point: " << endl; cin >> m; m + 1 = k; b += k; cout << " Is …

Member Avatar
Member Avatar
+0 forum 3

My JavaScript code works in all browsers except ie, I am not sure why. Any help is appreciated, Thank you. Website is [URL="http://illcomputers.comyr.com/custom.php"]http://illcomputers.comyr.com/custom.php[/URL] Javascript File[URL="http://illcomputers.comyr.com/scripts/lowendcost.js"]http://illcomputers.comyr.com/scripts/lowendcost.js[/URL] JavaScript Code [CODE] function updatecost1() { const keymouse = 40; const Case = 55; var data = document.getElementById("data"); var seldata = data.selectedIndex; var cpu = document.getElementById("cpule"); var selcpu = cpu.selectedIndex; var mem = document.getElementById("memorylemr"); var selmem = mem.selectedIndex; var video = document.getElementById("videole"); var selvideo = video.selectedIndex; var os = document.getElementById("osle"); var selos = os.selectedIndex; var sound = document.getElementById("soundlemr"); var selsound = sound.selectedIndex; var dvd = document.getElementById("dvdwrite"); var seldvd = dvd.selectedIndex; var floppy = document.getElementById("floppy"); var …

Member Avatar
Member Avatar
+0 forum 4

Im attempting to write a program that will accept seperate sales amounts from the user and then will total the sales and display both the total sales and the sales tax from the sales at the programs end, if you can provide any help or insight i would greatly appreciate it [CODE]#include <stdio.h> #include <stdlib.h> #define SIZE 9 int main(void) { /*initialize */ int a[SIZE]= {0}; int total, sales, tax; /*input data */ printf ( "Enter sales (enter -1 to end):$ "); scanf ("%d", a[SIZE] ); while ( a[SIZE] != -1 ){ total = sum_array(a,SIZE) ; tax = total * …

Member Avatar
Member Avatar
+0 forum 1

I'm trying to write a program that will accept input from the user as sales, then it will total the sales and display both the total and the sales tax (total multiplied by .0825 [CODE] #include <stdio.h> #include <stdlib.h> #define SIZE 9 int main(void) { /*initialize */ int a[SIZE]= {0}; int total, sales, tax; /*input data */ printf ( "Enter sales (enter -1 to end):$ "); scanf ("%d", &sales ); while ( sales != -1 ){ total = sum_array(a,SIZE) ; tax = total * .0825; printf ("Enter sales in a week(enter -1 to end):$ "); scanf ( "%d", &sales ); …

Member Avatar
Member Avatar
+0 forum 5

The End.