both the functions are in cmath header file.
to find the squre root
cout<<sqrt(variable);
to find the square
cout<<pow(a,2);
Type: Posts; User: Saimadhav
both the functions are in cmath header file.
to find the squre root
cout<<sqrt(variable);
to find the square
cout<<pow(a,2);
thanks anyway!!!
a lot. it worked
ah!. they havent thouight the whole class function and i know till classes.( i learnt it on my own!!!)
Thanks mate!...ii learn c++ in school. but they havent thought function.(i know till classes).
is it possible to have the same logic inside the main method?
no answers please.
I am writing a code to display the HCF(highest common factor) of a number. For those of you who dont know just google it.
i have come up with this piece of code
#include<iostream>...
#include<iostream>
#include<conio.h>
#include<string>
#include<iomanip>
using namespace std;
int main()
{
int point;
int player1=0,player2=0;
string name1,name2;
hi guys, i wanted to write a piece of code that can be used for table tennis matches scoring.
The rules is
1>a person wins a match if he reaches 11 points with a difference of 2,
2>if it is10-10...
digital artist.i dont take part in any c++ exams , i learn c++ just to be creative and not to cheat.
just take this code
and turn this in
#include<iostream>
#include<conio.h>
#include<iomanip>
using namespace std;
int main()
{
just , save the header file in the project window. then build the project.
1.How do I use the bit wise operator?
2. I have tried this code
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int a,b;
main()
{
int option;
char array[5];
array[2]="5+6";
cout<<array[2];
cin>>option;
if(option==11)
{
cout<<"Good:";
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int hours_worked;
float pay_rate=5.5;//just an example ,you should change it for your needs
float wages;
...
i have written a model program . though my actual program contains another set of questions(the questions i have used here are real easy.)
i have made use of srand and rand funtions
here is my code...
I hav created a menu in DOS window.
IT looks like this
MAIN MENU
1.GAME
2.HIGHEST SCORES
3.EXIT
the code
can anyone give a hint or somethin?
please!
is it possible to get an output like
1
22
333
4444
55555
using for loops?
thanks matsp for your concern. i am 15 . i am a beginner.i was thinking about a program that would act as a report card . so the marks of each student gets stored in a txt file. i then move it to a...
thanks a lot.....
i ran the program it runs great.
but the re run it again the the old value gets erased!.
what should i do?
rgds
i ask the user to input something and the result is stored.what should i do to save whatever is there on the runtime screen to the hard disk?
maybe this will work.
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int number,a,a1,b,b1;
cout<<"Enter a three digit number"<<endl;
what is the data type for taking inputs of words or sentences?
or can i use char data type like
char a[20];
can an novice like me understand it or what should i do understand it?
try this simple and short code instead
#include<iostream.h>
#include<conio.h>
main()
{
system("cls");
int a,b;
how does one store a number or a character permanently in c++ .
for ex
the program asks you for a number lets say 5
and every time you run the program it prints 5?