beingtopper.jkp@gmail.com
+91-7529019575
Free Demo

Being Topper

  • Home
  • About Us
    • Founder’s Profile
    • Franchise
    • Women’s Entrepreneurship Development
  • Blog & Events
  • Modules
    • Website Planning and Creation
    • Social Media Marketing Course
    • Search Engine Optimization
    • SEM/PPC Training
  • Branches
    • Rajasthan
      • Ajmer
      • Jaipur
      • Jodhpur
      • Udaipur
      • Kota
      • Sikar
    • Janakpuri
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us

Being Topper

  • Home
  • About Us
    • Founder’s Profile
    • Franchise
    • Women’s Entrepreneurship Development
  • Blog & Events
  • Modules
    • Website Planning and Creation
    • Social Media Marketing Course
    • Search Engine Optimization
    • SEM/PPC Training
  • Branches
    • Rajasthan
      • Ajmer
      • Jaipur
      • Jodhpur
      • Udaipur
      • Kota
      • Sikar
    • Janakpuri
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us
  • Home
  • About Us
    • Founder’s Profile
    • Franchise
    • Women’s Entrepreneurship Development
  • Blog & Events
  • Modules
    • Website Planning and Creation
    • Social Media Marketing Course
    • Search Engine Optimization
    • SEM/PPC Training
  • Branches
    • Rajasthan
      • Ajmer
      • Jaipur
      • Jodhpur
      • Udaipur
      • Kota
      • Sikar
    • Janakpuri
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us

Being Topper

  • Home
  • About Us
    • Founder’s Profile
    • Franchise
    • Women’s Entrepreneurship Development
  • Blog & Events
  • Modules
    • Website Planning and Creation
    • Social Media Marketing Course
    • Search Engine Optimization
    • SEM/PPC Training
  • Branches
    • Rajasthan
      • Ajmer
      • Jaipur
      • Jodhpur
      • Udaipur
      • Kota
      • Sikar
    • Janakpuri
    • Tilak Nagar
    • Noida
    • Chandigarh
    • Mumbai
  • Contact Us
Algorithm Design and analysis ProgramsB.tech notesC++ programInformation technology

C++ PROGRAM FOR ACTIVITY SELECTOR

Being Topper Admin 25/05/2013 0 Comments

  WRITE A PROGRAM FOR ACTIVITY SELECTOR

 

#include<iostream.h>
 #include<conio.h>
 void main()
 {int act[3][7],i,j,temp,start,a[7],k=1,min;
 clrscr();
 for(i=0;i<7;i++)
 a[i]=0;
 for(i=0;i<7;i++)
 act[0][i]=i+1;
 for(j=0;j<7;j++)
 {cout<<"\nEnter the starting time of "<<j+1<<" activity:";
 cin>>act[1][j];
 cout<<"Enter the finishing time of "<<j+1<<" activity:";
 cin>>act[2][j];
 }
 for(i=0;i<7;i++)
 {min=act[2][i];
 start=act[1][i];
 temp=i;
 for(j=i+1;j<7;j++)
 {if(act[2][j]<min)
 {min=act[2][j];
 start=act[1][j];
 temp=j;
 }
 }
 act[2][temp]=act[2][i];
 act[1][temp]=act[1][i];
 act[2][i]=min;
 act[1][i]=start;
 }

a[0]=1;
 i=0;
 for(int m=1;m<7;m++)
 {if(act[1][m]>=act[2][i])
 {a[k]=m+1;
 k++;
 i=m;
 }
 }
 cout<<"\The activities that can be performed is:";
 for(i=0;a[i]!=0;i++)
 cout<<a[i]<<" ";
 getch();
 }
C++ PROGRAM FOR ACTIVITY SELECTOR WITH OUTPUT ..


C++-PROGRAM-FOR-ACTIVITY-SELECTOR

 

Algorithm and design analysis C++ PROGRAM FOR ACTIVITY SELECTOR WITH OUTPUT SCREEN c++ programs
AboutBeing Topper
"Being Topper, established in 2013, is a premier Digital Marketing Training institute Known for its specializing in digital marketing courses in Delhi. At Being Topper, our carefully crafted training programs are designed to offer learners the practical skills and knowledge essential for a thriving career in today's digital space. Led by certified professionals, the institute delivers top-rated courses that cover key areas, including Social Media Marketing, Pay-Per-Click advertising, content marketing and SEO. With hands-on projects and a focus on industry-specific practices, Being Topper prepares individuals to become effective digital marketing professionals, ready to excel in an increasingly digital-centric world
In Socials:
PrevC++ PROGRAM ON QUICK SORT24/05/2013
C++ program to perform robin karp string matching25/05/2013Next

Related Posts

B.tech notesBCA NOTESEvent HandlingInformation technologyJava ProgramsPrograms/Algorithm

java program for counting vowels , consonants , digits and whitespaces …

Java program for counting vowels , consonants , digits and white spaces (more…)

Being Topper Admin 17/03/2014
Algorithm Design and analysis ProgramsB.tech notesBCA NOTESC++ programInformation technology

c++ program to perform breadth first search

WRITE A PROGRAM TO PERFORM BREADTH FIRST SEARCH (more…)

Being Topper Admin 25/05/2013
Categories
Recent Posts
  • Vipin Khuttel Inspires Entrepreneurs at Networking Meet in Gurgaon
  • Vipin Khuttel Founder of Being Topper Recognized for Advancing Digital Literacy and Social Empowerment
  • Vipin Khuttel Organizes International Conference for Digital Excellence 2, Elevating the Future of Technology
  • India’s Top Occult Science Enthusiasts Gather at AgyatOnSearch – Awards & Seminar in New Delhi
  • India’s Leading Digital Marketer, Vipin Khuttel Interacted with Top Influencers of Delhi at BJP West Delhi’s Event

Copyright © 2025 Being Topper ® . All Rights Reserved