578 Topics
| |
I made a simple program - conservative sequence integers with a sum, for example input: 15, the output should be 1, 2, 3, 4, 5 I made this program in c++ and it worked successfully, see below: #include <iostream> #include <string> using namespace std; int main() { int num, i, … | |
hi. so i need help in understanding this program. its a hindu arabic - roman numeral converter. i got it from some site. i cant seem to understand how the whole process goes. Const sMatrix As String = "I~V~X~L~C~D~M" Private Function toroman(ByVal sDecNum As String) As String Text1.Text = sDecNum … | |
There was discussion thread http://www.daniweb.com/software-development/python/threads/424953/polynomial-division for class based implementation for polynomials, and I developed a version utilizing the magic methods to enable operation with normal arithmetic operation. I only inherited sequence structure from list type. Interoperability with scalar types is not implemented to avoid too complicated type checks of the … | |
Write a function estimatePi() to estimate and return the value of Pi based on the formula found by an Indian Mathematician Srinivasa Ramanujan. It should use a while loop to compute the terms of the summation until the last term is smaller than 1e-15. The formula for estimating Pi is … | |
Basically I have found myself stuck in a math problem, any possibilities for assistance? I know this is java but I figured there must be a java programmer out there that knows how to solve this? c=95% In small NY towns (population < 30000) a sample of 22 libraries had … | |
Hi everyone, this is my first post and I am new to C++. I am trying to figure out how to do this project. Newton’s method is an algorithm that can be used to solve an equation of the form f(x) = 0 using a sequence of approximations. Here’s how … | |
Newton's Method to find polynomial solution Hi everyone, this is my first post and I am new to C++. I am trying to figure out how to do this project. Newton’s method is an algorithm that can be used to solve an equation of the form f(x) = 0 using … | |
**The problem:** Our "thankyou" page (goal page) is not recording all of our conversions. For instance, our analytics account is showing 19 conversions for yesterday, but we actually had 34 conversions. **The situation and the Code:** Our thankyou page is being called dynamically from the checkout page through a jquery/ajax … | |
Hi, I am writing a Silverlight Bing Maps based application and I am trying to merge two (and more) polygons. The approach I am using at the moment is the following: The geometry for the polygons is stored in a database, and Im writing and reading from it through a … | |
[URL="http://www.yandex.ru/"]Yandex[/URL] is one of the leading Internet portals in Russia, and yes they do still use that terminology instead of search engine. The name itself, apparently, stands for Yet Another Indexer which is kind of apt as the company has just published the results of Yet Another iPad Survey. However, … | |
I have to wirte a code for monte carlo pi approximation for a menu driven calculator. here is my code but when i run it it shows me 1 instead of the pi value. can someone tel me what is wrong. double approximatepi(void) { double x,y,z,pi,randomnumber; double r,p,in; int tries; … | |
how to multiply two integers when one of the integers is user-input ? | |
i have two string .One has sentence of Devanagari /Nepali langauge="संसार भरी साथी बनाऔ" and next i have the vowels of Nepali Language".I have created the array of both the array and compared each letter. But i got trouble while append the vowels to letter and get the required array … | |
I need a code which can solve the equations like this :- 56*78+(78/8) In this we know that brackets must be solved first and then divide/multiply and then add/subtract. So, i need a code for solving this kind of equations which contains multiple operators in single line. Thnks :) | |
this program is to find the largest palindrome of 3 digit numbers.this code is workig for two digit numbers but it is not working for 3 digit numbers. `` #include<stdio.h> #include<conio.h> #include<math.h> void main() { int i,j,con=0; long int num=0,res=0; clrscr(); for(i=999;i>900;i--) { for(j=999;j>i;j--) { num=(i*j); con=pal(num); if(con==0&&num>=res) res=num; } … | |
I’m trying to produce this equation in VB.NET h = (sh * s + (dia / 2 (tan(ang))) + ((dia / 2 (tan(ang1))) / 3)) This is where I’d prefer to retrieve the data from. Sh = sheet height = 1 (can be variable)(data retrieved from textbox) S = sheets … | |
Hello to everyone! This is my first post here, I hope you can help me. I'm making a class work in python and I'm a little lost: I have to use classes to represent monomials and polynomials, and the classes should contain methods to add, substract, multiply and divide them. … | |
| I'm making a math problem generator in visual c#, using a series of random number generators to create a unique math problem each time with some protocols implemented(later to use this for harder difficulties). There are different types of math to be used but right now I'm working on a … |
I know this is a simple quetsion but I am stuck. I need to create a view that displays the discount house price by 5%. CREATE VIEW v_hou_discount AS SELECT hou_price - (hou_price * '.05') as '5% Discount Price' from house; What am I doing wrong? | |
| Good evening I'm running a tipping competition, and am hoping to make the updating slightly less tedious. The code currently reads as follows: <?php $query = " SELECT SUM(comptipsterselections.profit) as Profit, comptipsterselections.stable, comptipsterboard.link FROM comptipsterselections INNER JOIN comptipsterboard ON comptipsterselections.stable=comptipsterboard.stable WHERE comptipsterselections.comp = 'aintree 2010' GROUP BY comptipsterselections.stable, comptipsterboard.link ORDER … |
I can't seem to figure out what I'm missing. After the end user selects one or more classes, they go to a page that runs a foreach statement to determine which discount to use on each class. But it doesn't seem to be adding the resulting total to the array, … | |
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 … | |
Hello friends As I am a beginner of C# in .NET , I got stuck in this program This program is about displaying prime numbers between the range of o and the number you entered. Its running properly.But the output is not correct. Here is my coding [CODE]using System; using … | |
``this code keeps kicking out the error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a2595218/public_html/login.php on line 49 with the out-put " The username you enterted was not found " I should be seeing the error " You must active your acount to play. $form";" … | |
hi for my programming class we have to write an average calculator program in any langauge we want. I did mine in Java and im fairly new to programming. the problem with my code is how can I improve it to make sure user's incorrect input ruins program. for example … | |
Hi, I need to build a rating system for a travel community . It will contain user preferences such as say average time of the aircraft,aircraft age,legroom,number of stops, route quality. These might be modelled as checkboxes on my web page. The user can then select which all criterias he … | |
So this is mainly a Design/Clean Coding sort of question, I know I've read something about this previously but I can't find it, I believe it's in one of my reference books on C/C++ so it wouldn't likely be useful to my predicament. This question includes a lot of Java … | |
I need help for another one of my assignments for CS Class. On the rubric, one of the part said: > all characters are shifted right by two positions and the last two characters becomes the first two characters The condition is that the string has to be entered by … | |
Without using /,% and * operators. write a function to divide a number by 3, itoa() function is available. | |
| import java.util.*; import java.io.IOException; import java.util.Scanner; import java.util.Random; public class LinkedListProgram { public static void main(String[] args) throws IOException { int i,number, ran; Scanner sc = new Scanner(System.in); LinkedList<Integer> list = new LinkedList<Integer>(); ListIterator li; String line; Random random = new Random(); int pick = random.nextInt(150); System.out.println("Enter # of nodes"); … |
The End.