₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,418 members, 8,445,409 topics. Date: Wednesday, 15 July 2026 at 01:01 AM

Toggle theme

Please Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingPlease Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! (1582 Views)

1 Reply (Go Down)

Please Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! by Aplaudez(op): 10:12am On Feb 03, 2016
A c# program to find the factorial of an integer value given from the console! please guys help me out!
Re: Please Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! by Nobody: 10:27am On Feb 03, 2016
Re: Please Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! by Nobody: 6:52pm On Feb 04, 2016
In Java using Recursion


public static int factorial(int value){
if(value<=1){
return 1;
}else{
return value * factorial(value -1);
}
}
Re: Please Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! by Nobody: 2:39am On Feb 05, 2016
Aplaudez:
A c# program to find the factorial of an integer value given from the console! please guys help me out!
Saw the post a little bit too late.
Re: Please Programmars Help Me Out With This C# Program! I Have Test Tommorrow!!!!! by Sirnuel: 9:11am On Feb 05, 2016
//in C++, using recursion;


#include <iostream>

int factorial (int x); //function prototype

using namespace std;

int main (){

int x;
int fact;

cout << "\nEnter a positive integer: \t";
cin >> x;

fact = factorial(x);

cout << "The factorial of " << x << " is " << fact;

return 0;
}

//function definition;

int factorial (int x){

if(x == 1) {return 1;}

else {return x*factorial(x-1);}

}



//in C++, using iteration;

#include <iostream>

using namespace std;

int main (){

int x;
int fact = 1;

cout << "\nEnter a positive integer: \t";
cin >> x;

cout << "The factorial of " << x << " is ";

//forever loop
for(; wink{

if (x == 1){
break;
}

else {
fact = fact * x;
x--;
}
}

cout << fact << endl;

return 0;
}
1 Reply

Please Guys Help Me With This C++ Program Exam Question. It's Urgent.Fix This C++ Code If You canHelp! Im Stuck With This C# Program234

Coding From Scratch Or Using Bootstrap, which way?Java Programmer Needs HelpThe Importance Of Github To A Programmer