Results 1 to 9 of 9

Thread: assignment

  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 assignment

    assignmentsn needed about for loop in c++
    ma ishq-e-kainaat ma zanjeer ho saku
    mujh ko hisar-e-zaat ke shar se rahai de


  2. #2
    Zeeshanef's Avatar
    Zeeshanef is offline Advance Member
    Last Online
    28th December 2023 @ 02:18 PM
    Join Date
    30 Mar 2006
    Location
    Great Pakistan
    Gender
    Male
    Posts
    846
    Threads
    12
    Credits
    1,456
    Thanked
    46

    Default

    Assignment to aap ko khud karni chahye!
    Aap ko assignment chahye! lekin loop se related koi question to hoga!

    C++ main to Do-While, While aor For loop hain, aap konsi loop ki baat kar rahay hain!

  3. #3
    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

    mujh ko for loop se related questions chahie for practice yar

  4. #4
    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

    questions
    1. user will enter a number and check that number is prime or not prime.
    2. enter a number and prints its table.
    3. print this shape on screen
    *
    **
    ***
    ****
    *****

  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

    #include<iostream.h>
    #include<conio.h>
    void main()
    {
    clrscr();
    int num,sum,i,counter=1;
    cout<<"enter the intiger which u want table (1 to 20)=";
    cin>>num;
    if(num>0&&num<20)
    for(i=1;i<=10;i++)
    {
    sum=num*i;
    cout<<num<<"*"<<i<<"="<<sum<<endl;
    counter++;
    }
    else
    cout<<"invalid";
    getch();
    }





    #include<iostream.h>
    #include<conio.h>
    void main()
    {
    clrscr();
    int n,i,divisioncount=0;
    cout<<"enter the number";
    cin>>n;
    for(i=2;i<=n/2;i++)
    if(n%i==0)
    divisioncount++;
    if(divisioncount!=0)
    cout<<"not prime\n"<<"divisble by=" <<divisioncount;

    else
    cout<<" prime";
    getch();
    }






    #include<iostream.h>
    #include<conio.h>
    void main()
    {
    clrscr();
    int num,row,column;
    cout<<"enter the intiger="<<endl;
    cin>>num;
    for (row = 1; row<=num; row++)
    {
    for (column= 1; column<=num; column++)
    {
    if (column<=row)
    cout<< "*";
    else
    cout<< " ";
    cout<<endl; }
    }
    getch();

    }

  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

    yar 3rd wla sahi nae hai help karo output aik hi column ma show ho rahi ha

  7. #7
    Zeeshanef's Avatar
    Zeeshanef is offline Advance Member
    Last Online
    28th December 2023 @ 02:18 PM
    Join Date
    30 Mar 2006
    Location
    Great Pakistan
    Gender
    Male
    Posts
    846
    Threads
    12
    Credits
    1,456
    Thanked
    46

    Default

    Ye lijye:

    Code:
    #include<iostream.h>
    #include<conio.h>
    
     void main()
     {
     clrscr();
     int num,row,column;
     cout<<"Eenter the integer:? ";
     cin>>num;
     for (row = 1; row<=num; row++)
      {
        for (column= 1; column<=num; column++)
         {
          if (column<=row)
           cout<< "*";
          else
           cout<< " ";
           column++;
         }
       column=1;
       row++;
       cout<<endl;
      }
    
     getch();
     }

  8. #8
    Zeeshanef's Avatar
    Zeeshanef is offline Advance Member
    Last Online
    28th December 2023 @ 02:18 PM
    Join Date
    30 Mar 2006
    Location
    Great Pakistan
    Gender
    Male
    Posts
    846
    Threads
    12
    Credits
    1,456
    Thanked
    46

    Default

    Here is the program, check whether number is Palindromic or not:
    Code:
    #include<iostream.h>
    #include<conio.h>
    
    void main(){
        int num,r,sum=0,tmp;
        clrscr();
        cout << "Enter a number:? ";
        cin >> num;
    
        tmp=num;
        while(num){
             r=num%10;
             num=num/10;
             sum=sum*10+r;
        }
        if(tmp==sum)
    	 cout << tmp << " is a palindrome.";
        else
    	 cout << tmp << " is not a palindrome.";
    
    getch();
    }

  9. #9
    Omer27's Avatar
    Omer27 is offline Advance Member
    Last Online
    30th January 2024 @ 04:01 PM
    Join Date
    27 Jan 2009
    Age
    31
    Posts
    1,725
    Threads
    72
    Credits
    1,374
    Thanked
    66

    Default

    pehle 50 natural numbers me se prime or non prime display karwao....

Similar Threads

  1. PHP MySQL Class-1
    By shakeel in forum PHP MySQL
    Replies: 498
    Last Post: 28th August 2016, 10:34 AM
  2. PHP MySQL Class-15
    By shakeel in forum PHP MySQL
    Replies: 68
    Last Post: 10th July 2015, 07:06 AM
  3. plz help me with ISLAMIAT assignment
    By n0mi_89 in forum Ask an Expert
    Replies: 3
    Last Post: 7th October 2011, 11:49 AM
  4. business assignment
    By Saad_Sherdil in forum Ask an Expert
    Replies: 2
    Last Post: 21st February 2010, 12:06 PM
  5. help me about assignment
    By arghouri in forum Ask an Expert
    Replies: 3
    Last Post: 9th January 2010, 06:25 PM

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
  •