Results 1 to 17 of 17

plz help in c++.....

This is a discussion on plz help in c++..... within the C++ forums, part of the Courses category; plz koi mujy c++ ma password lekny ka tareka bataye jis ke character display na ho. balky *** maho......

  1. #1
    *I am Banned*
    Join Date
    Apr 2009
    Location
    pakistan
    Age
    28
    Posts
    107

    Arrow plz help in c++.....


    plz koi mujy c++ ma password lekny ka tareka bataye jis ke character display na ho. balky *** maho...

  2. #2
    *I am Banned* sahibzada8's Avatar
    Join Date
    Feb 2010
    Location
    peshawar
    Age
    28
    Posts
    255

    Re: plz help in c++.....

    BROTHER AAP ISKO CHEACK KARIAN

    #include <iostream.h>
    #include <conio.h>
    #include <string.h> // for strcmp

    int main(void)
    {
    int c;
    int i;
    char pw[80];
    cout << "Enter Password: ";
    for ( i = 0; i < 79 && (c = getch()) != '\r'; ++i ) {
    pw[i] = c;
    putch('*');
    }
    pw[i] = '\0';
    cout << endl;
    if ( strcmp(pw, "password") == 0 ) {
    cout << "Correct" << '\n';
    } else {
    cout << "Incorrect" << '\n';
    }
    return 0;
    }

  3. #3
    Senior Student mehekasfar000's Avatar
    Join Date
    Jan 2010
    Location
    Karachi
    Posts
    147

    Re: plz help in c++.....

    What we do by using C++ language?
    Learning English easily --Read my story-->> http://www.ittaleem.com/showthread.php?p=723782


  4. #4
    iTT Student
    Join Date
    Jul 2010
    Location
    faisalabad/pakistan
    Age
    28
    Posts
    1

    Re: plz help in c++.....

    AOA BRO...
    PLEASE HELP ME IN THIS PROGRAM;
    USING LOOPS
    DISPLAY DIAMOND OF "*",.......REPLY FAST PLS....

  5. #5
    /\/\oderator
    Join Date
    Aug 2010
    Location
    karachi
    Age
    31
    Posts
    354

    Re: plz help in c++.....

    TO HASAN JAWED
    Aslamo Alekum
    Try This

    #include <iostream>
    using namespace std;
    void print (int rowsize);
    int main()
    {
    int rowsize;

    cout<<"Please type in a positive odd integer: ";
    cin>>rowsize;

    print(rowsize);
    return (0);
    }
    void print(int rowsize)
    {
    int spaces=rowsize/2, currentsize=1, counter, count;
    for(counter=0;counter!=(rowsize+1)/2;counter++){
    for(count=spaces;count!=0;count--)
    cout<<" ";
    spaces--;
    for(count=currentsize;count!=0;count--)
    cout<<"*";
    currentsize+=2;
    cout<<endl;
    }
    currentsize=rowsize-1;
    spaces+=2;
    for(counter=rowsize/2;counter!=0;counter--){
    for(count=0;count!=spaces;count++)
    cout<<" ";
    spaces++;
    for(count=currentsize;count!=0;count--)
    cout<<"*";
    currentsize-=2;
    cout<<endl;
    }
    cin>>rowsize;
    }
    jaha par start "*" ise change kar kay aap koi bhi character print karwa saktay ho

  6. #6
    iTT Student
    Join Date
    Aug 2010
    Location
    Mirpurkhas
    Age
    31
    Posts
    31

    Re: plz help in c++.....

    C++ is very tough men...

  7. #7
    Senior Student Adnan Ahmad Khan's Avatar
    Join Date
    Aug 2010
    Location
    Bannu/Pakisatn
    Age
    27
    Posts
    261

    Re: plz help in c++.....

    For SOlution4u.

    Yar aapka diamond ka program deka. Ye tho buht lengthy nhi hai???
    Kya simple Method sai nhi lika ja skta????
    Reply fast plzzz

  8. #8
    /\/\oderator
    Join Date
    Aug 2010
    Location
    karachi
    Age
    31
    Posts
    354

    Re: plz help in c++.....

    Quote Originally Posted by Adnan Ahmad Khan View Post
    For SOlution4u.

    Yar aapka diamond ka program deka. Ye tho buht lengthy nhi hai???
    Kya simple Method sai nhi lika ja skta????
    Reply fast plzzz
    brother programming is all about logic har aik ki apni apni approach he agar aap kisi aur tarah banana chahte he to aap bana sakte he
    Cheapest Web Designing Service for personal/educational/companies at very Cheap Price just
    visit: www.Solution 4U.1free.Ws Voice: 0321-3809083
    delete space

  9. #9
    Senior Student Adnan Ahmad Khan's Avatar
    Join Date
    Aug 2010
    Location
    Bannu/Pakisatn
    Age
    27
    Posts
    261

    Re: plz help in c++.....

    Quote Originally Posted by solution4u View Post
    brother programming is all about logic har aik ki apni apni approach he agar aap kisi aur tarah banana chahte he to aap bana sakte he
    Thank you Brother;
    I am at beginner's stage. And i will try to do That....

  10. #10
    Senior Student Adnan Ahmad Khan's Avatar
    Join Date
    Aug 2010
    Location
    Bannu/Pakisatn
    Age
    27
    Posts
    261

    Re: plz help in c++.....

    Brothers mai nai Diamond K lye simple program lk lya hai.
    Hope that, aap ko bi simple lgay ga...

    #include<iostream.h>
    #include<conio.h>
    #include<iomanip.h>
    main()
    {
    clrscr();
    int row;
    cout<<"Enter a positive odd integer "<<endl;
    cin>>row;
    if (row%2==0) // if the enterd number is even, it will become odd.
    {
    row+=1;
    } /* Any where the variable s is used it
    show the spaces*/
    int s=(row+1)/2;
    for (int a=1; a<=row; a+=2)
    { /*The first two for loops will display upper
    portion of the diamond*/
    cout<<setw(s);
    for (int b=1; b<=a; b++)
    {
    cout<<"*";
    }
    cout<<endl;
    s--;
    }
    s=2; // Setting spaces to start from 2.
    row-=2; // Setting row size 2 less than from the largest size.
    for (int c=row; c>=1; c-=2)
    {
    cout<<setw(s);
    for (int d=1; d<=c; d++)
    { /*These two For loops will display the lower
    portion of the Diamond*/
    cout<<"*";
    }
    cout<<endl;
    s++;
    }
    getch(); // To retain the screen.
    }

  11. #11
    ITT Student
    Join Date
    Dec 2010
    Location
    pakistan
    Age
    28
    Posts
    1

    Re: plz help in c++.....

    Yrrr koi mujhe C+++++++ download karne ka tariqa btye ga.plzzzzzzzzzzzzz

  12. #12
    iTT Student
    Join Date
    Feb 2011
    Location
    karachi
    Age
    26
    Posts
    1

    Re: plz help in c++.....

    yar mUjhe c++ language seekhne k liye yaha kUch help mil sakti hai ?

  13. #13
    Senior Student Adnan Ahmad Khan's Avatar
    Join Date
    Aug 2010
    Location
    Bannu/Pakisatn
    Age
    27
    Posts
    261

    Re: plz help in c++.....

    Quote Originally Posted by naughtybhulakkar View Post
    yar mUjhe c++ language seekhne k liye yaha kUch help mil sakti hai ?
    Aap C++ k classes k tags dek lai,
    start sai....
    Inshallah samj aajaye gi.
    If you want to be alive forever, Then DIE for others...

  14. #14
    iTT Student
    Join Date
    Jan 2012
    Location
    karachi/pakistan
    Age
    30
    Posts
    10

    Re: plz help in c++.....

    YE JO JITNE BHE CODING HAI YE TURO C++ PE CHALE GE OR TURBO C++ OR DEV C++ ME KYA FARQ HAI

  15. #15
    iTT Student
    Join Date
    Sep 2012
    Location
    Peshawar/Pakistan
    Posts
    14

    Re: plz help in c++.....

    Awsome work..........

  16. #16
    iTT Student
    Join Date
    Jul 2012
    Location
    gujrat
    Age
    25
    Posts
    17

    Re: plz help in c++.....

    Quote Originally Posted by rameezjafrie View Post
    YE JO JITNE BHE CODING HAI YE TURO C++ PE CHALE GE OR TURBO C++ OR DEV C++ ME KYA FARQ HAI
    koi khas farq nai hei.....

  17. #17
    Senior Student
    Join Date
    Jun 2012
    Location
    lahore
    Posts
    105

    Re: plz help in c++.....

    this is great pro,...
    Hope for best, Ready for Worst....

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •