![]() |
C++ Help
hey guys i'd like to receive some help by some programs in C++ thanks
I use Visual C++ so i hope the code would be convenient 1st Excersice Write a complete C++ code in which you develop a function to compute n factorial N factorial = n! = 1*2*3*…*n In this code, you read the value of n from the user and you pass it to the function. 2nd Exercise Consider the following series x(n) = 1/n + 1/(n-1) + … + 1 for all n > 0 x(1) = 1 Develop a recursive function to compute the value of x(n) 3rd Exercise Write a C++ code that generates a random number between -10 and +15 ( this one we should use rand()%... something like that ) Thx Guys in advance :D more to come later |
Re: C++ Help
PM me i have them:p i solved them the first year of uni
i still have the solution on a word file :p and i can give you an e-book that it may help you |
Re: C++ Help
Quote:
Quote:
Bring us shi desem :p |
Re: C++ Help
1st exercise:
int n, nf=1; cin>>n; for(int i=1; i<=n, i++) { nf*=i; } cout<<nf hayda L base taba3 L code.. it has been a full year i haven't touched c++, and i have an exam tomorrow so i can't stay long for this. |
Re: C++ Help
Quote:
just give me till afternoon i am at work ill post them as i get home |
Re: C++ Help
I want also a code for a program to change a number entered by a user into binary
|
Re: C++ Help
Decimal to Binary Converter:
Code:
#include <iostream.h> |
Re: C++ Help
Quote:
Code:
#include <iotream>Damn I Miss The C++ :p |
Re: C++ Help
Code:
1.23these are the exercises that i found i still have two e-books c++ ill post them later by tonight |
Re: C++ Help
Guys New Updates :
Arrays Develop a C++ code where you declare an array of 50 elements. After assigning random values to your array, you need to compute the Mean, Median and Mode. 1.Mean
2D Arrays Exercise 1 Develop a C++ code where you declare a 2 dimensional array A of 50 rows and 30 columns. 1.Develop a function that assigns random values to your array. Each random value r should satisfy the following relation: -120 < r < 100 or r > 300. 2.Develop a function that generates a new array B in which you store the average of the elements stored over the same column in array A Exercise 2 There are three students and there have been 4 quizzes. The results are ·first student got 77, 68, 86, 73 ·second student got 96, 87, 89, 78 ·third student got 70, 90, 86, 81 Goal 1.Develop a function that prints the grades of students 2.Develop a function that finds the highest grade 3.Develop a function that finds the lowest grade 4.Develop a function that computes the average of each student Hint: Use a multiple-subscripted array (table) ·Rows are students Columns are grades Strings EXERCISE 1 Develop a function that reads a string, removes all space from that string and prints out the result on the screen. Example: read “hello there” and produce “hellothere”
Develop a function that reads a string, replaces all letters “e” by “a” and prints out the result on the screen Example: read “hello there” and produce “hallo thara”
EXERCISE 3 Develop a function that reads a string, finds the most repeated letter, and prints out the result on the screen. Example: read “hello there” and produce “e” is the most repeated lettre
EXERCISE 4 Develop a function that reads a string and prints it backwards on the screen. Example: read “hello there” and produce “ereht olleh”
EXERCISE 5 Write a myStrlen function which is the same as the library strlen function.
EXERCISE 6 Write the myStrcpy function which is the same as the library strcpy function.
EXERCISE 7 Write the myStrNcpy function which is the same as the library strncpy function.
EXERCISE 8 Write the myStrcmp function which is the same as the library strcmp function.
EXERCISE 9 Write the myStrNcmp function which is the same as the library strncmp function.
Write a program that reads a line from the keyboard, and stores that line in a string. a.Develop a function that allows you to insert a word wherever you want in that string. b.Develop a function that allows you to delete any word of that string.
Thx Alot Guys ... Remember Visual C++ compiler :D |
Re: C++ Help
sorry,but u cant learn it if someone else is doing if for you ,u have to experience it yourself.
|
Re: C++ Help
I Totally Agree With Neoxter, You Just Gave Us 13 Exercises :S How Are You Gonna Learn If You Don't Do Them Yourself?
|
Re: C++ Help
Well Edgard Helped me with the 1st one w ba3d 3ane2 taweel it worked :D
and ill do the rest alone i guess lol :( |
Re: C++ Help
i totally agree with Neoxter and Tawa... u have to exercise to c++ wa illa u wont get anywhere... believe me i used to be like you and i changed major kilo min wara c++ :p
im now workin on vb... likin it much more than c++ |
| All times are GMT +1. The time now is 08:50 AM. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger