Search:

Type: Posts; User: Sky_Daughter

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. the longest increasing subsequence of prime numbers whose reverse numbers are prime

    Hi guys!
    I've been trying to make a program that reads n elements of an array and then it displays the longest increasing subsequence of prime numbers whose reverse numbers are prime as well.
    For...
  2. Replies
    1
    Views
    3,121

    rotating the digits in a number

    Hi guys !
    I have to make a program that rotates the digits in a number with k positions to the right. I am not sure if I understand this correctly.
    I've found this problem in a book without any...
  3. Replies
    6
    Views
    784

    No. Actually,I see 1 1 1 and 9 1 9. What should I...

    No. Actually,I see 1 1 1 and 9 1 9. What should I do? It's because of that space " "...
  4. Replies
    6
    Views
    784

    I've just run my program and it displays 111 and...

    I've just run my program and it displays 111 and 919 instead of 113,919,911 and 913. How should I fix this problem?
  5. Replies
    6
    Views
    784

    Of course,it was so obvious. I forgot the a/=10....

    Of course,it was so obvious. I forgot the a/=10. I usually don't make these kind of mistakes but this time I just couldn't figure it out. I thought that there was a/=10.
    Sorry for the dumb...
  6. Replies
    6
    Views
    784

    help with a c++ program

    Hello!
    I have to make a program that reads two numbers a and b and then displays all the numbers that can be formed by replacing the first and the last digit of b with every single digit of a.
    For...
  7. I've tried to solve it but I couldn't. Please...

    I've tried to solve it but I couldn't. Please take a look at my code :


    #include<iostream>
    using namespace std;

    int main()
    {
    int dg1[10],dg2[10],a,b,i = 0,j = 0,k = 0;
  8. c++ program-the number of common digits of 2 numbers a & b

    Hello guys!
    I have to make a program that displays the k number of common digits of 2 numbers a and b.
    For example if a is 23456 and b is 456900 then the number of common digits is 3(4,5 and 6)....
  9. Replies
    5
    Views
    5,395

    This is my usual notation.I am not a native...

    This is my usual notation.I am not a native english speaker so it is common for me to use ok1,ok2 and other 'terrible' variable names.
    Also my program doesn't work the way it should.If n is 11 the...
  10. Replies
    5
    Views
    5,395

    friends numbers program

    Hello guys!

    I have to make a program in c++ that displays on the screen all the friends numbers <= n . For example , if n is 11 then it should display the pairs :
    (3,5);(5,7)
    Friends numbers are...
  11. Replies
    4
    Views
    1,140

    Thank you ! It works now very well :D

    Thank you ! It works now very well :D
  12. Replies
    4
    Views
    1,140

    My first idea was to add the last digit of every...

    My first idea was to add the last digit of every term of the sum.
    By summing the digits I thought I could find out the last digit of the number given.
    For example,if a is 2 the number 2^4 + 3^4 =...
  13. Replies
    4
    Views
    1,140

    help with a c++ program

    Hello !

    I need some help with this code(my program should display the last digit of the sum
    2^a + 3^a +...+9^a - where a is a number entered from the keyboard):


    #include <iostream>...
  14. Thread: three

    by Sky_Daughter
    Replies
    4
    Views
    874

    I am sorry to disappoint you but this is not the...

    I am sorry to disappoint you but this is not the title I chose for the problem.I found this problem in a book a couple of weeks ago and this was its name 'three'.What is so wrong with it? Maybe it...
  15. Thread: three

    by Sky_Daughter
    Replies
    4
    Views
    874

    three

    Hello guys!

    I've tried to solve the next problem:
    For a sequence of natural numbers n you must establish the maximum number of elements of the sequence whose sum divides 3 and the items that...
  16. Replies
    6
    Views
    1,625

    Thank you very much for your reply but I want to...

    Thank you very much for your reply but I want to know why my program doesn't work and what am I supposed to do to fix the errors.
    Actually,I have to find out how many ascending sequence are in the n...
  17. Replies
    6
    Views
    1,625

    sorting numbers

    Hello!
    I want to make a program to arrange numbers in ascending order using arrays.
    Here is what I wrote :


    #include <iostream>
    using namespace std;

    int main()
    {
  18. Thread: string

    by Sky_Daughter
    Replies
    15
    Views
    2,099

    Thank you again for your codes! This is what I...

    Thank you again for your codes! This is what I wrote yesterday :



    #include <iostream>
    #include <string>
    using namespace std;

    bool is_name(string);
  19. Thread: string

    by Sky_Daughter
    Replies
    15
    Views
    2,099

    I can assure you that I'm not asking for full...

    I can assure you that I'm not asking for full homework. I want to learn the C++ program language. Anyway, my program was not a homework because I haven't studied the c++ at school yet :)
  20. Thread: string

    by Sky_Daughter
    Replies
    15
    Views
    2,099

    @ AndrewHunter I'm sorry I asked you that stupid...

    @ AndrewHunter I'm sorry I asked you that stupid question about the strlen() function. When I posted yesterday I hadn't seen your reply . I don't know why but I hadn't seen it.
    Anyway , I solved...
  21. Thread: string

    by Sky_Daughter
    Replies
    15
    Views
    2,099

    So how can I make my first program to check all...

    So how can I make my first program to check all the characters in the string ? Using the strlen() function ? But how?
    As for the second, how do I initialise my string?
  22. Thread: string

    by Sky_Daughter
    Replies
    15
    Views
    2,099

    Yes, first time I wrote this program : ...

    Yes, first time I wrote this program :


    #include <iostream>
    #include <string>
    #include <cctype>
    using namespace std;

    int main()
    {
  23. Thread: string

    by Sky_Daughter
    Replies
    15
    Views
    2,099

    string

    Hi everyone! I am new to c++ programming and I want to ask you something.
    I want to make a program that checks if the user entered a valid name that contains only letters.
    I use the for loop and...
  24. Replies
    12
    Views
    3,642

    Thank you for replies. So should I put something...

    Thank you for replies. So should I put something else in 1000 ' s place ? A number < 1000 and the program will work,right?
    About that ( if ( cin >> n ) break; ), I never used it this way. It's the...
  25. Replies
    12
    Views
    3,642

    I think I know the '\n' in the cin.ignore() but...

    I think I know the '\n' in the cin.ignore() but 1000?
Results 1 to 25 of 26
Page 1 of 2 1 2