I just can't think of a good algorithm for this program after two days.
There are n persons (you take n from the user) and you have to permute them in room 1 and room 2 for all possible number of permutations. If the number of persons in a room are same then they should be sorted according to...
Computer Programming
Maths (Advanced Calculus)
Physical Sciences (Not sure till now what we are going to learn in this. :confused: )
Digital Logic Design
English
and I should not forget the stupidest subject - Human Values :devil: .
I completed my assignments faster than I usually do. But maybe it is because of the tests starting (and ending too, in 3 days) starting from next week. :cry: :cry:
I did it the following way. The number of characters and lines are coming out fine, but the words are usually more than the actual given by wc.
#include<stdio.h>
int main()
{
FILE *fp;
int words=0,chars=0,lines=0;
char prev,curr; //prev variable is included to...
English Genius
You scored 100% Beginner, 92% Intermediate, 100% Advanced, and 80% Expert!
You did so extremely well, even I can't find a word to describe your excellence! You have the uncommon intelligence necessary to understand things that most people don't. You have an extensive vocabulary...
Outcast Genius
65 % Nerd, 78% Geek, 78% Dork
For The Record:
A Nerd is someone who is passionate about learning/being smart/academia.
A Geek is someone who is passionate about some particular area or subject, often an obscure or difficult one.
A Dork is someone who has difficulty with...
I too verified with the teacher, the answer is 1135. But how in heaven did you calculate the value of 500!, chroot? What is the maximum precision of the calculator you used?
I have to code a program in C that will give the correct number of digits of n! where n is upto 500.
I thought this way:
Get the value of log(n!) by using a for loop. (like log1 + log2 + log3... upto logn, log is to the base 10). Now the final answer will be (int)sum + 1. If I give 500...
Ok the question goes as:
Take four co-ordinates and check whether the fourth coordinate lies inside the triangle. I first did it with the area concept, that is, find the area of the whole triangle, then find the area of the three trangles formed by the fourth coordinate. if the sum of the...