look up the modulus command, you can do a FOR LOOP instead if you don't want to do modulus, having that loop going from 1 to 1/2 of the number you are checking for.
Basically to check to see if it...
Type: Posts; User: dvsumosize
look up the modulus command, you can do a FOR LOOP instead if you don't want to do modulus, having that loop going from 1 to 1/2 of the number you are checking for.
Basically to check to see if it...
alright, thank you. Also do you have any links that are a good guide on overloading?
i just realized what you are saying
Sorry, latenight brain fail.
COverload Me;
cout << "\n\t The Numbers Are " << Me.Add(3,4);
Well i am returning a cout which isn't really a string right?
but when i returned Hide on its own, nothing had appeared.
i thought hide would output because i'm calling the Add method in my...
my bad, its late and i wasn't thinking about that haha, thanks.
____________________________________________________________________________________________
return cout << "\t\t The value is...
my library is
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cmath>
#include <string>
#include <cstring>
I want to put a double to a string and output that string, but i can't figure out how to do it.
string Add(double A, double B)
{
double C,D,X;
string Hide;
Hide = "";
if( B > 0)
so i basically got my case ones down
using logic and newton method
void Roots(double a, int b)
{
double x,d = 10;
int c;
I looked up the newtons method and it works for when you know the root and you can make switch for it, which was what i was doing at first. But i can't do it for an unknown fractional root i.e....
i can't use pow or sqrt or the like, defeats the purpose.
i'm trying to do it using only for loops and if commands.
Also why doesn't it return a thing for 2?
So i'm trying to write a program that finds the root of a number without formulas i.e. sqrt(x).
so far i have come up with
void Roots(double a, int b)
{
double x;
switch(b)
Wow...i fail... Yeah sorry for wasting your time on something so simple. Thanks
So I can't figure out how to change my result into an exact decimal.
#include <cmath>
#include <iostream>
#include <cstdlib>
#include <iomanip>
#define Pi double(3.14159)
so im making a periodic table of elements and im outlining each box wiht ascii codes, but it has a back background and makes my code look ........ty, is there any way to make the background...
W8 I JUST HAD A THOUGHT, sparked teeny teeny bit by tabstop. What if i find area from 0 to negative and hten area from 0 to other x interecept thats in positive. do you think that will work? but...
dude i know what it looks like, i just dont know how to code it for one minusing hte other. For like the other thread where i did the parabola area at x=4, it does it from 0 to 4. The first x...
im not in calculus right now, and i have to do a program similar to the other recent thread i posted. im so stumped on how to input it and such.
im like racking my brains. we have a project and we have to find the area inbetween parabolas y=x^2 and y = (-1)*(x-1)^2 +4 and must use N number of slices inbetween to get near perfect ammount. I...
ty vm
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
double k,A,B,W,NumberOfSlices,Width,y,Area,Sum;
NumberOfSlices = 1200000.0;
A = 10.0;
YAY ALLS I NEEDED NOW WAS TO PUT SUM * 4 AND ADD SOME 000 ONTO THE # OF SLICES AND YEs! wow im such an idiot for not realize it sooner. thankk you so much
w8 think i figured it out., removing the + area part on area =
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
double k,A,B,W,NumberOfSlices,Width,y,Area,Sum;
NumberOfSlices = 11.0;
Area = 0.0;
so here is my code
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()