578 Topics
| |
Here is my first Code Snippet contribution: a C++ sub-routine that computes the roots of a quadratic equation. Notes: * This sub-routine checks if a = 0. * IF a = 0, then the equation is actually not a quadratic equation; it is a linear equation with one--if any--root. * … | |
I choose a program that can read data from a txt file. Now, I input two column from txt file and i want to substract first value of 2nd column to every value of 2nd column. finally I want the sum of substracted values. Can anyone please help me. Actually, … | |
**Here is the assignment:** Write a C++ program to calculate and display the number of primes in the first 50 “chiliads”. Your results should be exactly as presented below, under testing. Design Considerations: I think you will find your program easier to structure and write if you break it down … | |
Complex numbers are seldom used in daily life, altough you could say that every real number is complex, but with the imaginary part equal to zero. And btw. "complex" is a bit of a misnomer, perhaps we should call them "easies", because often they make it easier to perform certain … | |
I'm trying to sum all numeric fields individually. I won't always know the field names, otherwise I could manually construct the query `SELECT SUM(Field1) as Field1, SUM(Field2) as Field2...etc FROM myTable` Is there a way to construct this on the fly in mysql? I'm thinking there's probably a way to … | |
I was in the library's multimedia room to do my assignment, but all PCs don't have Visual Studio and other smiliar programs. So I wrtie the code on Notepad for the question: > Design a solution that will determine and display the fewest number of ringgit and coins in change … | |
I have a void function that takes data from an ifstream, reads the first value, (which is an ID #), and compares that value against the ID# info from an array of records. If it's invalid, the rest of the line is ignored. If it's valid, it adds the hours … | |
Can someone help me with this? This is part of my first assignment. I am quite new to programming. > A company wants to transmit data over the telephone, but they are concerned that their phones are tapped. All of their data are transmitted as four-digit integers. They wanted you … | |
Using Visual Basic 10, and I am trying to identify min/max statistics and display the results. My calculations are working, but the display is not (line 68 & 80). With the way the code is written now, I don't get the error but my results are displayed as "The minimum … | |
Hi folks, I am aware this is a problem that many people have, but I am yet to find an answer... I have a 10x10 grid generated using a html `<table>`, each cell has an id reffering to its location (ie. #15 - row 1, colmn 5). All I need … | |
This code example shows how to create a dictionary with row,column indexed (r,c) key tuples from a typical list of lists 2D matrix. Also an example is shown of the ease of processing the resulting dictionary. | |
Hello. Can I add any data directly from table into data base using dreamviewer 8 by php? i mean in design view, i add table. then when i enter a data in the cell, so can i add this cell text to a field in DB table? Also how can … | |
I am (student) just switched to linux working on NoC (noxim) simulator in ubuntu 12.04 c++ is supported assignment from university, I want to make a script that call my whole program multiple times (for loop= e.g 10) and want to take average value from the functions that were called … | |
I am working on NoC simulator in ubuntu 12.04 c++ is supported, I want to make a script that call my whole program multiple times (for loop= e.g 10) and want to take average value from the functions that were called from other files. Should I create a new file … | |
Hello, for some reason, I am getting a very weird negative nuber as my average for my program, here is my code: int sum, avg; sum = 0; avg = 0; for(int i = 1; i < size; i++){ sum += array[i]; } avg = sum / size; my output … | |
Write a java code, Extend class Fraction by adding methods for the arithmetic operators +, - and /, and the six relational operators (==, !=, <, >, <= and >=). Then compute a menu-driven fraction calculator. Program shoud do all 9 arithmetic operations and 0 to stop. User should first … | |
Okay so I have couple of questions about lists in vb.. Please be aware that it's all related to integers only no strings or others 1. How to sum values of a list? 2. How to sort values of list from highest to lowest? Also how would I display list … | |
| Hey everyone, I am having trouble on this one practice problem. It is a question that requires another question I already completed to solve this one. The qusetion is "Implement a method allPerfect() that takes an integer parameter end. The method prints every perfect number from 1 to end. Use … |
Hi i'm having a trouble with this i got 3 textbox and i format it to Textbox1.Text = Format(Textbox1.Text, "Standard") Textbox2.Text = Format(Textbox2.Text, "Standard") Textbox3.Text = Format(Textbox3.Text, "Standard") which give something like this 1,230.00 2,500.00 1,245.00 and when i add it `Textbox4.text = Val(Textbox1.Text) + Val(Textbox2.Text) + Val(Textbox3.Text)` the result … | |
Wednesday 6th June 2012 is [URL="http://www.worldipv6day.org/"]World IPv6 Launch Day[/URL] (no, seriously, it is) and, we have been continually reminded in a Chicken Little fashion, the IPv4 address space sky is falling. The fact that the media obsession with Internet addresses running out has been on-going for at least a decade … | |
Forget all that stuff your parents taught you about not talking to strangers. One lucky user brought Twitter to its 20 billionth tweet over the weekend, an award as prestigious as being swept away in the confetti and balloons of being the 10,000th grocery market shopper. The momentous tweet was … | |
Hi I want to take input of two variable as integer and than do addition with the two variables. The ans will stored in another variable. The program will repeat after every addition end and will ask for user input of varibles and will do addition again. My qus is … | |
Hello all! I am sorry to have to waste your time with such an easy problem but I am stuck with some coders block on this one. I know it is definitely an easy fix I just cannot seem to wrap my head around it at the moment... I do … | |
public class secenek { public static void main(String[] args) { int option=0; int a,b; a=5; b=7; if (option==0){ System.out.println("A+B= "+a+b); } } } | |
| Hi Guys, I was trying to code in C for the following. You are given with 2 files, file1.txt and file2.txt. The contents of the file contain INTERGER values. Add the contents of the file and write them to another file file3.txt. My code is as follows #include <stdio.h> #include … |
The news wires have been buzzing over the weekend after it emerged that the Raspberry Pi website had been hit by a 'million zombie' Distributed Denial of Service (DDoS) attack during the week. Although the outage was relatively brief, with the Raspberry Pi Foundation admitting the attack with a Twitter … | |
Hi frnds, I am developing a struts2 project, I do require how to multiply to variable using struts tag ... I tried with this code below, <s:set var="total" value="var1" /> <s:set var="tot" value="%{var2 * #attr.total}"></s:set> <s:property value="%{'' + #attr.total}"/> AM getting the output as 0.0 .. Please any help ... | |
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. … | |
I was just wondering is there a class handling integrals and derivatives or do i have to make methods on my own? | |
Hello everyone. Im COMPLETELY new to programming and Ruby and i would like to know how i can make this happen: What I want from my program is to understand letters as numbers then add up names into numbers and then retreive previously written names when number x is given. … |
The End.