by: Martin Jørgensen |
last post by:
Hi,
Consider (factorial.cpp):
#include <iostream>
using namespace std;
double R=3.2; /* not used, but R is static because it is a global
variable (file scope) */
|
by: aNt17017 |
last post by:
This is my code:
long fact(int n)
{
if (n == 0)
return(1);
if(n > 100)
{
printf("\t\tERROR: %d is too large for factorial.\n", n);
return 1;
|
by: salman |
last post by:
this program is giving compile time error. so plse ge me the logic of
factorial
# include <iostream.h>
# include <math.h>
void main()
{
int f,sum=0,i,j,n;
cout<<"\nEnter Number: ";
|
by: Tin |
last post by:
Dear Sir/Madam,
I have one assignment , which need me to
write a program to calculate the factorial of an integer,
then press the button that would display the result in a label.3
& the...
|
by: Umesh |
last post by:
i wrote the following program to calculate factorial:
#include<stdio.h>
#include<iostream.h>
void main()
{
int i,n;
long int p=1; // or long double p=1; for exponential result which I
don't...
|
by: Sugandh Jain |
last post by:
Hi.
How to write a function that will return me the factorial (say in a string)
for the any positive integer it takes?
When we find a factorial of even say 2000 or a higher number, it will be...
|
by: dynamo |
last post by:
Hello everyone,i am a beginner in c++ and i am trying to write a program that outputs the factorial of a number in my own way,however i don't know why it's not working.Thanks for any help.This is the...
|
by: doctor309 |
last post by:
hello friends iam not able to get logic behind solving the question mentioned below,,,,i tried a lot using various books.....online tutorials but at the end just lost it......
you ppl are kindly...
|
by: becky808 |
last post by:
Hi,
I'm trying to write a program to calculate n factorial but it won't compile. Can anyone tell me what I'm doing wrong?
#include <iostream>
#include <cmath>
using namespace std;
int...
|
by: Blue sky |
last post by:
Hi,I am a new C++ learner.The follow prgram produces a wrong
result,but I can't find the wrong.Can you help me?Thank you!
#include<stdio.h>
long factorial( long number);
int main()
{
int...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|