Results 1 to 7 of 7

Thread: help in c++

  1. #1
    hasib ahmed's Avatar
    hasib ahmed is offline Advance Member
    Last Online
    12th November 2022 @ 11:45 PM
    Join Date
    08 Sep 2008
    Location
    rawalpindi
    Age
    34
    Gender
    Male
    Posts
    850
    Threads
    106
    Credits
    83
    Thanked
    15

    Default help in c++


    write an algorithmthat use a for loopto calculate and print the product of the integers from1 to 25 which are divisible by 5??
    yar please samjhane ki koshish bhi karna...
    ma ishq-e-kainaat ma zanjeer ho saku
    mujh ko hisar-e-zaat ke shar se rahai de


  2. #2
    Join Date
    07 Jan 2011
    Location
    Bruxelles
    Gender
    Male
    Posts
    19,938
    Threads
    1080
    Credits
    172,407
    Thanked
    3333

    Default


    borther ksis zamaney main perhi thi any ways jitna yaad hai aap ko batat hoo try kartey hain ban jaye ga...

    01 #include <cstdlib>
    02 #include <iostream>
    03 #include <stdio.h>


    int main( void )
    {

    int count;
    int product=1;

    printf( "\nThe Divisible numbers 1-25 are\n\n");

    for( count=1; count<=25; count++ ){
    product =count/product;
    printf("%d\n", count);

    }

    printf( "\nProduct is \n%d", product);

    return 0;

    }

    ABHI JALDI MAI YEH BANA HAI ISS KO COMPILE KAREEN MAIN BAAD MAI AAP KO REPLY KAOO GA AABHI TORA BUSY HOON
    Last edited by Derwaish; 5th November 2011 at 08:49 AM.

    ایک طرف لمبی لمبی امیدیں
    دوسری طرف کل نفس ذائقۃ الموت

  3. #3
    Kashif Mehmood1's Avatar
    Kashif Mehmood1 is offline Advance Member
    Last Online
    23rd January 2022 @ 06:51 PM
    Join Date
    30 May 2009
    Location
    Rawalpindi
    Age
    33
    Gender
    Male
    Posts
    1,392
    Threads
    49
    Credits
    1,198
    Thanked
    58

    Default

    for k bad 1 if condition aye gi
    if (count%5==0)
    {
    product=product*count;
    print count;
    }
    aur han product ko 1 say initialize krna ha

  4. #4
    Urduadsense's Avatar
    Urduadsense is offline Senior Member
    Last Online
    28th February 2019 @ 06:26 PM
    Join Date
    18 Apr 2009
    Location
    Bhakkar
    Age
    34
    Gender
    Male
    Posts
    1,440
    Threads
    51
    Credits
    72
    Thanked
    108

    Default

    Dear Darwesh bhai!
    Bhut acha code dia he lakin ye c language me he. c++ me thora different he. Anyway thanx
    [URL="."][COLOR=Red][B][COLOR=Magenta]Read ITD Thread[/COLOR] | Cheap Shared hosting, [COLOR=Blue]Reseller Hosting[/COLOR], [COLOR=DarkGreen]Master Reseller[/COLOR], [COLOR=Sienna]Alpha Reseller Hosting & [COLOR=DarkSlateGray]Domains[/COLOR]
    [/COLOR][/B][/COLOR][/URL]

  5. #5
    hasib ahmed's Avatar
    hasib ahmed is offline Advance Member
    Last Online
    12th November 2022 @ 11:45 PM
    Join Date
    08 Sep 2008
    Location
    rawalpindi
    Age
    34
    Gender
    Male
    Posts
    850
    Threads
    106
    Credits
    83
    Thanked
    15

    Default

    thanks for sharing check karta hun

  6. #6
    hasib ahmed's Avatar
    hasib ahmed is offline Advance Member
    Last Online
    12th November 2022 @ 11:45 PM
    Join Date
    08 Sep 2008
    Location
    rawalpindi
    Age
    34
    Gender
    Male
    Posts
    850
    Threads
    106
    Credits
    83
    Thanked
    15

    Default

    thori c changing kr k bn gaya thanks yaar

  7. #7
    *Abdul-Basit*'s Avatar
    *Abdul-Basit* is offline Senior Member+
    Last Online
    4th September 2016 @ 03:12 AM
    Join Date
    03 Aug 2010
    Location
    Lahore
    Age
    32
    Gender
    Male
    Posts
    10,691
    Threads
    498
    Credits
    964
    Thanked
    1298

    Default

    Quote hasib ahmed said: View Post
    thori c changing kr k bn gaya thanks yaar
    Problem Solved..

Bookmarks

Posting Permissions

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