Forum: C Nov 5th, 2008 |
| Replies: 4 Views: 1,268 Thank you very very much . :)
May God bless you all.
Regards,
hinduengg |
Forum: C Nov 2nd, 2008 |
| Replies: 4 Views: 1,268 Please help me find the sine series .
My program is:
#include<stdio.h>
#include<conio.h>
#include<math.h>
float facto(int a);
int main()
{ |
Forum: C++ Sep 25th, 2007 |
| Replies: 3 Views: 3,196 after this you should input the elements into the array like this:
cin>>n;
int * y=new int [n];
for(int z=0;z<=n-1;z++)
{
cout<<"element please"<<endl;
cin>>y[z];
} |
Forum: C++ Sep 25th, 2007 |
| Replies: 3 Views: 3,196 Perhaps you should try this like this-
char * ret=new char [n];
for a one dimension array |
Forum: C++ Aug 1st, 2007 |
| Replies: 4 Views: 539 Yes please tell what exactly you wish to know?
Is it concatenation of 2 nos or two strings? |
Forum: C++ Aug 1st, 2007 |
| Replies: 18 Views: 9,312 Could you please tell me what does this statement does
matrix[i][j]=rand()%2;
check your loop working
Besides you are yourself returning matrix[0][0]; so please try with a[i][j] in the j's... |
Forum: C++ Aug 1st, 2007 |
| Replies: 18 Views: 9,312 At the site you must check out the Languages section of the index. |
Forum: C++ Aug 1st, 2007 |
| Replies: 18 Views: 9,312 You must read this for pointers-http://www.eternallyconfuzzled.com (http://www.eternallyconfuzzled.com/)
I think that you might be unable to access the value stored in the returned memory address... |
Forum: C++ Jul 18th, 2007 |
| Replies: 62 Views: 11,157 To Lerner ,
The code posted by you is not giving the output that I long for now.
Perhaps now I should end this discussion for no concrete thing has been achieved I will show my professor what... |
Forum: C++ Jul 17th, 2007 |
| Replies: 62 Views: 11,157 I am wondering whether I am right or not, is it that one can call the function from its own code block , because I have been taught that one can call a function from any other function or from... |
Forum: C++ Jul 16th, 2007 |
| Replies: 62 Views: 11,157 Wow Lerner :icon_cheesygrin:your solution is really superb, awesome , mind blowing . Now I would make the whole code and then post it. I hope that although it is little lengthy(for 7 loops) but still... |
Forum: C++ Jul 15th, 2007 |
| Replies: 62 Views: 11,157 To Lerner,
I tried your programs , they give the same output as my original one posted before yours. Could you help in atleast in hinting how to form the third loop to control per[3] if not the... |
Forum: C++ Jul 15th, 2007 |
| Replies: 62 Views: 9,314 Is it a monthly competition , if so what does the winner receive ?
I did not read about this in the FAQ. Is this type of competition an integral part of Daniweb?
:) Please tell,
hinduengg |
Forum: C++ Jul 13th, 2007 |
| Replies: 62 Views: 9,314 this is my code but you would need to change the headers as per new rules of C++
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
int main()
{
char a[100];
char... |
Forum: C++ Jul 13th, 2007 |
| Replies: 62 Views: 11,157 I got that point but the code at present does not give 6 permutations as needed this means we neend to use 3 nested loops inside x = 0 to len-1 . Okay I will try it tomorrow for right now it is 12:29... |
Forum: C++ Jul 13th, 2007 |
| Replies: 62 Views: 11,157 Thank you, thank you Lerner . I will try the program on my compiler to see what is its output. Or please could you tell me what is the difference between the last code of yours and mine .
What is... |
Forum: C++ Jul 13th, 2007 |
| Replies: 62 Views: 11,157 I am not able to swap the values because I cannot hold th position of y in the 'if' loop.
temp=a[y];
a[y]=a[y++];
a[y++]=temp; |
Forum: C++ Jul 13th, 2007 |
| Replies: 62 Views: 11,157 Thank you JRM!
This is the code that gives me only three permutations of string " joy"
I am not able to swap the values because I cannot hold th position of y in the 'if' loop.
temp=a[x];... |
Forum: C++ Jul 13th, 2007 |
| Replies: 62 Views: 11,157 What is meant by mechanical random shell game?. I did not understand this hint , please enlighten me.:)
Thank you,
hinduengg |
Forum: C++ Jul 12th, 2007 |
| Replies: 62 Views: 11,157 Did you try swapping in nested loop ?:) |
Forum: C++ Jul 12th, 2007 |
| Replies: 7 Views: 1,140 if n=1128(int type)
use this-
while(n>0)
{
digit=n%10; //extract individual digit to use
cout<<digit<<endl //or do any operation on it
n=n/10; //reducing the n by 10 so that it... |
Forum: C++ Jul 12th, 2007 |
| Replies: 62 Views: 11,157 you mean that you got the output with a code
do i need 1 nested loop and nothing more complication |
Forum: C++ Jul 12th, 2007 |
| Replies: 62 Views: 11,157 WOW! Thank you Lerner, JRM , Bench .
You are great for you removed such an important doubt. I had been confused about this but now its pretty clear to me and perhaps in my code thats why its... |
Forum: C++ Jul 11th, 2007 |
| Replies: 62 Views: 11,157 Thank you for permu[3]='\0' answer.
It means that if an array has 100 then we can utilise space upto 99 charecters - o to 99 and then '\0'
Nichito puts and cout both do the same function in C++... |
Forum: C++ Jul 11th, 2007 |
| Replies: 62 Views: 11,157 Well its not that my code is wrong , actually I use turbo C++ which is surely outdated in today's world. It still accepts the old rules and syntaxes applied in C++ , which have been changed since... |
Forum: C++ Jul 10th, 2007 |
| Replies: 62 Views: 11,157 I understood Lerner ,it means you are interchanging the positions by all combinations . This is the thing which I did earlier but did not find much success by drawing the array with letters in... |
Forum: C++ Jul 10th, 2007 |
| Replies: 62 Views: 11,157 I wish to ask how can permu and input has 4 size when dol is 0 ,1, 2 ,'\0'
because this would mean that it can fit in 4 charecters with null .
then null... |
Forum: C++ Jul 10th, 2007 |
| Replies: 62 Views: 11,157 To JRM,
line 26 prints the string with alterations automatically regarding that and that s why have a question too with thinking sign! |
Forum: C++ Jul 10th, 2007 |
| Replies: 62 Views: 11,157 and I have to design for seven character containing string then sholud I use 7 loops? I am unable to understand. Please give advice. The code is in C++ and I tried Nichito's program my way it gave me... |
Forum: C++ Jul 10th, 2007 |
| Replies: 62 Views: 11,157 I did not understand the first part of your post , I am aiming the second part . why do you use permu[3] then put a null charecter
at position 3? |
Forum: C++ Jul 10th, 2007 |
| Replies: 47 Views: 8,591 You may opt for Java because its a new language that is yet to be developed instead of C or C++ . The latter have become full fledged,vast. There are thousands of sites which use java applets. Java... |
Forum: C++ Jul 10th, 2007 |
| Replies: 6 Views: 2,309 yes perfectly true I did not run the code but I had the statements in mind quite well but not the order . I am sorry.
It is first extract the digit by mod method then use wherever you wish to and... |
Forum: C++ Jul 10th, 2007 |
| Replies: 62 Views: 11,157 Thanks for taking pains . The code below gives me 5 permutations
-"old" remains.
#include<iostream.h>
#include<string.h>
#include<conio.h>
#include<stdio.h>
int main()
{ |
Forum: C++ Jul 10th, 2007 |
| Replies: 6 Views: 2,309 |
Forum: C++ Jul 10th, 2007 |
| Replies: 6 Views: 2,309 You can extract the no.'s digits by this method :
if n is user's input of int type then
[/code]
while(n>0)
{
n=n/10;
digit=n%10;
if(digit==4)
counter++; |
Forum: C++ Jul 9th, 2007 |
| Replies: 62 Views: 11,157 I am unable to implement the logic suuceesfully .:sad:
I have put in my best efforts but no result ! I can not develop the code and you cannot say that I have not tried. I spent a lot of time using... |
Forum: C++ Jul 9th, 2007 |
| Replies: 62 Views: 11,157 Thank you for the wonderful aid. Now I have got a new direction in the seemingly complicated logic . I would now try once again with the technique although I was thinking the same but could not... |
Forum: C++ Jul 7th, 2007 |
| Replies: 5 Views: 11,621 char array="food";
You can use delete[]array to clear the memory |
Forum: C++ Jul 7th, 2007 |
| Replies: 62 Views: 11,157 this is the code that I actually got while browsing through code snippets
#include<iostream>
#include<cstring>
using namespace std;
void char_permutation(char str[],char append[])
{ |
Forum: C++ Jul 7th, 2007 |
| Replies: 1 Views: 1,667 |