Search:

Type: Posts; User: subhash.rao

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. You need 2 loops 1)to traverse from firstnum to...

    You need 2 loops
    1)to traverse from firstnum to secondnum
    2)to traverse from 2 to currentnum and check if it is divisible(remainder is 0)[This is how you find if the number is prime or not]
  2. You can have two arrays like char...

    You can have two arrays like



    char plaintext[26];
    char ciphertext[26];

    plaintext containing all alphabets...u could write a loop and use ASCII values...

    Have a string to take the keyword
  3. I hope this is what you wanted to implement

    Please do avoid global variables...I have just tweaked your program....



    #include <iostream>

    using namespace std;
  4. Replies
    53
    Views
    8,142

    dude is this some assignment or for your lab........

    dude is this some assignment or for your lab.....

    If it is your own problem for which ur coding then FIRST change ur compiler first....either use Pellas C or Code Blocks.....

    which college are...
  5. Replies
    8
    Views
    2,287

    for developing apps for a apple product like...

    for developing apps for a apple product like iPhone,iPod Touch which have iOS u should develop apps in XCode...
  6. Replies
    61
    Views
    5,266

    there are too many mistakes in the code...all the...

    there are too many mistakes in the code...all the variables are local to the functions which do not affect the local variables of main from which u are trying to get price,item,etc...even display...
  7. Replies
    5
    Views
    1,477

    h edited the post...check post #2 please...

    h edited the post...check post #2 please...
  8. Replies
    5
    Views
    1,477

    Maybe he had used a macro #define dbl double ...

    Maybe he had used a macro
    #define dbl double

    ...try adding it...

    EDIT:that made me think its a macro...but he edited the entire post....
  9. Replies
    1
    Views
    1,427

    check the things i have pointed out...can u give...

    check the things i have pointed out...can u give an example of such numbers....like tell the sample multplicand and multiplier which satisfies your condition...including the digits in partial and...
  10. Replies
    3
    Views
    3,502

    pleas check ur code....

    pleas check ur code....
  11. Replies
    14
    Views
    4,760

    u need to compile the other .c files with it......

    u need to compile the other .c files with it...
    i.e
    gcc main.c mod1.c mod2.c -I /home/username/code/folder
  12. a while loop addressing (|x|>tol) like ...

    a while loop addressing (|x|>tol)
    like


    while(|x|>tol)
    {
    //do stuff A
    }
    //do stuff B
  13. u could use a do while loop like this.... x...

    u could use a do while loop like this....


    x = guess*guess - n;
    do
    {

    if (x>0)
    {
    tooHigh = guess;
  14. changes 1) change main() to int main(void)...

    changes
    1) change main() to int main(void)
    2)move the card=rand()%52+1; to the first statement of the loop...so u get different cards for each draw...and u are not checking whether the card is...
  15. Replies
    13
    Views
    1,206

    u can use isaplha function present in ctype.h to...

    u can use isaplha function present in ctype.h to check whether the entered value is a alphabet or not......
  16. Replies
    13
    Views
    1,206

    ya...it should work...but if some one enters a...

    ya...it should work...but if some one enters a digit for the first place it will print line # 2...
  17. Replies
    13
    Views
    1,206

    instead of checking first with each alphabet...

    instead of checking first with each alphabet try...


    if(name[0]<'n')
    {
    printf("\nLine # 2");
    }
    else
    {
    printf("\nLine # 1");
  18. yes it is correct now...

    yes it is correct now...
  19. sorry my mistake..

    sorry my mistake..
  20. what matticus is trying to say is use do ...

    what matticus is trying to say is use

    do
    {
    if (num < min)
    num = min;
    else if (num > max)
    num = max;
    else num = num;
    ...
  21. I will suggest u a few changes... 1)change...

    I will suggest u a few changes...
    1)change main() to int main(void)
    2)assign min to the maximum number that can be inputted lik say min=9999
    3)change the line num=min to min=num
    4)change the line...
  22. Replies
    7
    Views
    1,067

    I was just trying to point out u may get...

    I was just trying to point out u may get undesirable output for some inputs....



    Anyway u r right..


    hehe..:eek:
  23. Replies
    7
    Views
    1,067

    I said to remove condition because if u add if...

    I said to remove condition because if u add if and make it else if(nbal < cred1) what will happen if for some input nbal is equal to cred1..for that u have write a seperate else again..correct me if...
  24. Replies
    7
    Views
    1,067

    check the else line...remove the condition after...

    check the else line...remove the condition after else it will work....
    and you could also reduce the code by removing redundant input of account number..
Results 1 to 24 of 27
Page 1 of 2 1 2