C++ program to find the smallest element of an Array according to Index


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 
 int list[100];
 int minindex=0,i=0,ssale=0,num=0;
 cout<<"how much long list of array elements you want enter number "<<endl;
 cin>>num;
 
 
 
 for(i=0;i<num;i++)
 {
 cout<<"enter your list "<<endl;
 cin>>list[i];
 }
 
 for(i=1;i<num;i++)
 {
 if(list[minindex]>list[i])
 {
 minindex=i;
 ssale=list[minindex];
 }
 }
 cout<<"samllest index is = "<<minindex<<endl;
 cout<<"samllest element is = "<<ssale<<endl;
}

Program to find the smallest element of an Array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
#define SIZE 10
using namespace std;
int main()
{
 int arr[SIZE];
 int minIndex=0,Ele=0;
 int i=0;
 cout<<"enter Array Elements"<<endl;
 for(int i=0;i<SIZE;i++)
 {
 cin>>arr[i];
 }
 for(int i=1;i<SIZE;i++)
 {
 if(arr[minIndex]>arr[i])
 {
 minIndex=i;
 Ele=minIndex;
 }
}
 cout<<"smallest object element is : "<<arr[minIndex]<<endl;
 cout<<"smallest object element place is : "<<Ele<<endl;
 system("pause");
}

Program to Reverse Array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 int list[100];
 int i=0;
 
 
 cout<<"enter list of integers programology content"<<endl;
 
 for(i=0;i<5;i++)
 {
 cin>>list[i];//programology content
 }
 for(i=5;i>0;i--)
 {
 list[i]=i;
 cout<<list[i];
 
 }
 
 
 return 0;
}

C++ program to find prime numbers between range


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh


#include<iostream>
using namespace std;
int main()
{
 int num,num1;
 int i,j,flag;
 cout<<"enter first range "<<endl;
 cin>>num;
 cout<<"enter second range "<<endl;
 cin>>num1;
 
 for(i=num;i<=num1;i++)
 {flag=0;
 for(j=2;j<i;j++)
 {
 if(i%j==0)
 
 flag=1;
 
 }
 if(flag==0)
 {
 cout<<i<<endl;
 }
 }
 return 0;
 }

Program to merge two Arrays C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include<iostream>
using namespace std;
int main()
{
 int arr[100];
 int arr2[100];
 int i=0;
 int c[100];
 
 cout<<"1st array "<<endl;
 for(i=0;i<5;i++)
 {
 cin>>arr[i];
 c[i]=arr[i];
 }
 cout<<"2nd array programology content"<<endl;
 for(i=0;i<5;i++)
 {//programology content
 cin>>arr2[i];
 c[i+5]=arr2[i];
 }
 for(i=0;i<10;i++)
 {
 
 cout<<"merged array programology content"<<c[i]<<endl;
 
 } 
}

Program to merge two Array into third array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
int arr[100],arr2[100],merge[100],i=0;

cout<<“enter 1st array “<<endl;
for(i=0;i<5;i++)
{
cin>>arr[i];
}

cout<<“enter 2nd array programology content”<<endl;
for(i=0;i<5;i++)
{
cin>>arr2[i];
}
for(i=0;i<5;i++)
{//programology content
merge[i]=arr[i];
merge[i+5]=arr2[i];
}
for(i=0;i<10;i++)
{
cout<<“merged array is “<<merge[i]<<endl;
}
return 0;
}

program to the maximum element from listed array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 int index,largestsale,i=0;
 int maxindex=0;
 int sales[10]={1,2,3,4,5,6,11,22,33,44};
for(index=1;index<10;index++)
 {
 
 if(sales[maxindex]<sales[index])
 {
 maxindex=index;
 largestsale=sales[maxindex];
 }
 }
 cout<<"highest index is "<<maxindex<<endl;
 cout<<"highest element is "<<largestsale<<endl;
 
 
}

program to find the maximum element of an array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 int index,largestsale,i=0;
 int maxindex=0;
 int sales[10];
 
 for(index=0;index<10;index++)
 {
 cout<<"enter your sales "<<endl;
 cin>>sales[index];
 
 }
 
 for(index=1;index<10;index++)
 {
 
 if(sales[maxindex]<sales[index])
 {
 maxindex=index;
 largestsale=sales[maxindex];
 }
 }
 cout<<"highest index is "<<maxindex<<endl;
 cout<<"highest element is "<<largestsale<<endl;
 
 
}

Program to find largest element and its index using Array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 int index,largestsale,i=0;
 int maxindex=0;
 int sales[10];
 
 for(index=0;index<10;index++)
 {
 cout<<"enter your sales "<<endl;
 cin>>sales[index];
 
 }
 
 for(index=1;index<10;index++)
 {
 
 if(sales[maxindex]<sales[index])
 {
 maxindex=index;
 largestsale=sales[maxindex];
 }
 }
 cout<<"highest index is "<<maxindex<<endl;
 cout<<"highest element is "<<largestsale<<endl;
 
 
}

C++ program for Insertion


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include<iostream>
using namespace std;
int main()
{
 int list[10]={1,2,3,4,5,6,7,8,9,10};
 int i,j,b[100],pos,no;
 cout<<"position to dele "<<endl;
 cin>>pos;
 pos--;
 cout<<"enter no. "<<endl;
 cin>>no;
 
 
 for(i=10;i>=pos;i--)
 {
 list[i+1]=list[i];
 }
 list[pos]=no;
 for(i=0;i<10;i++)
 {
 cout<<list[i]<<endl;
 }
 return 0;
 }

program to insert an element in an Array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include<iostream>
using namespace std;
int main()
{
 int list[100];
 int i,j,b[100],pos,no;
 
 for(i=0;i<10;i++)
 {
 cin>>list[i];
 }
 
 cout<<"position to dele programology content"<<endl;
 cin>>pos;
 pos--;
 cout<<"enter no. "<<endl;
 cin>>no;
 
 
 for(i=10;i>=pos;i--)
 {
 list[i+1]=list[i];
 }
 list[pos]=no;
 for(i=0;i<10;i++)
 {
 cout<<list[i]<<endl;
 }
 return 0;
 }

Program to find the maximum element of an Array and its index C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 
 int list[100];//programology content
 int maxindex=0,i=0,largestsale=0,num=0;
 cout<<"how much long list of array elements you want enter number "<<endl;
 cin>>num;
 
 
 
 for(i=0;i<num;i++)
 {
 cout<<"enter your list programology content "<<endl;
 cin>>list[i];
 }
 
 for(i=1;i<num;i++)
 {
 if(list[maxindex]<list[i])
 {
 maxindex=i;
 largestsale=list[maxindex];
 }
 }
 cout<<"highest index is = programology content"<<maxindex<<endl;
 cout<<"highest element is = "<<largestsale<<endl;
}

C++ program for insertion,deletion,maximum,minimum


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 
 char choice;
 int arr[50], size, insert, i=0, pos=0;
 int a[50],x,n,b[50];
 int list[100],j=0,temp=0;
 int pos1=0,pos2=0;
 int menu=0;
 
 cout << "to start process press (y/n)? "; 
 cin >> choice;
 while(choice =='Y'|| choice=='y')
 {
 
 
 cout<<"press 1 for insertion "<<endl;
 cout<<"press 2 for deletion "<<endl;
 cout<<"press 3 for maximum "<<endl;
 cout<<"press 4 for minimum "<<endl;
 cout<<"press 5 for swapping "<<endl;
 
 
 cout<<"choose menu following above instructions "<<endl;
 cin>>menu;
 
 
 if(menu==1)
 {//insertion
 cout<<"insertion menu"<<endl;
 cout<<"Enter Array Size : ";
 cin>>size;
 cout<<"Enter array elements : ";
 for(i=0; i<size; i++)
 {
 cin>>arr[i];
 }
 cout<<"Enter element to be insert : programology content";
 cin>>insert;
 cout<<"At which position (Enter index number) ? ";
 cin>>pos;
 
 for(i=size; i>pos; i--)
 {
 arr[i]=arr[i-1];
 }
 arr[pos]=insert;
 cout<<"Element inserted successfully..!!\n";
 cout<<"Now the new array is : \n";
 for(i=0; i<size+1; i++)
 {
 cout<<arr[i]<<" "<<endl;
 cout<<endl;
 cout<<endl;
 cout<<endl;
 cout<<endl;
 }
 
 }
 
 if(menu==2)
 {//deletion
 cout<<"deletion menu"<<endl;
 
 cout<<"How many elements of Array you want to create?";
 cin>>n;
 cout<<"Enter elements of Array";
 for(i=0;i<n;++i)
 cin>>a[i];
 cout<<"Enter element to delete:";
 cin>>x;
 
 for(i=0,j=0;i<n;++i)
 {
 if(a[i]!=x)
 b[j++]=a[i];
 }
 
 if(j==n)
 {
 cout<<"nSoory!!!Element is not in the Array";
 exit(0);
 }
 else
 {
 cout<<"nNew Array is ";
 for(i=0;i<j;i++)
 cout<<b[i]<<" "<<endl;
 cout<<endl;
 cout<<endl;
 cout<<endl;
 }
 
 }
 
 
 if(menu==3)
 {//maximum
 cout<<"maximum menu"<<endl;
 cout<<"enter list of element "<<endl;
 
 for(i=0;i<10;i++)
 {
 cin>>list[i]; 
 }
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 if(list[i]<list[j])
 {
 temp=list[i];
 list[i]=list[j];
 list[j]=temp;
 }
 
 }
 }
 cout<<"maximum number is = "<<list[9]<<endl;
 cout<<endl;
 cout<<endl;
 cout<<endl;
 }
 
 if(menu==4)
 {//minimum
 cout<<"minimum menu"<<endl;
 cout<<"enter list of element "<<endl;
 
 for(i=0;i<10;i++)
 {
 cin>>list[i]; 
 }
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 if(list[i]>list[j])
 {
 temp=list[i];
 list[i]=list[j];
 list[j]=temp;
 }
 
 }
 }
 cout<<"minimum number is = "<<list[9]<<endl;
 cout<<endl;
 cout<<endl;
 cout<<endl;
 }
 if(menu==5)
 {//swapp
 cout<<"swapping menu"<<endl;
 cout<<"enter list "<<endl;
 for(i=0;i<5;i++)
 {
 cin>>list[i];
 }
 
 cout<<"enter both positions "<<endl;
 cin>>pos1>>pos2;
 temp=list[pos1-1];
 list[pos1-1]=list[pos2-1];
 list[pos2-1]=temp;
 
 
 cout<<"swapped number are programology content";
 for(i=0;i<5;i++)
 {
 cout<<list[i];
 
 }//programology content
 cout<<endl;
 cout<<endl;
 cout<<endl;
 } 
}
return 0;
}

C++ program to find factorial using for loop


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include<iostream>
using namespace std;
int main()
{
 int num=0,numm,sum=1,i;
 
 
 cout<<"enter number ; programology content";
 cin>>num;
 
 while(num>0)
 {
 
 sum=num*sum;//programology content
 cout<<sum<<endl;
 num=num-1;
 
 }
 //programology content
}

Program to delete Array’s element C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include<iostream>
using namespace std;
int main()
{
 int list[100];
 int i,j,b[100],del;
 
 for(i=0;i<10;i++)
 {
 cin>>list[i];
 }
 cout<<"elemnt to dele programology content"<<endl;
 cin>>del;
 for(i=0;i<10;i++)
 {
 if(list[i]!=del)
 {
 b[j]=list[i];
 j++;
 } 
 }
 //programology content
 for(i=0;i<j;i++)
 {
 cout<<b[i]<<endl;
 }
 return 0;
 }

Program to delete an element of Array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include<iostream>
using namespace std;
int main()
{
 int list[100];
 int i,j,b[100],ind;//programology content
 
 for(i=0;i<10;i++)
 {
 cin>>list[i];
 }
 cout<<"index to dele programology content"<<endl;
 cin>>ind;
 
 for(i=ind;i<9;i++)
 {
 list[i]=list[i+1];
 }
 //programology content
 for(i=0;i<9;i++)
 {
 cout<<list[i]<<endl;
 }
 return 0;
 }

Count specific letter from character Array’s list C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 char gender[]={'m','f','m','m','m','m','h','m'};
 int a=0,i=0;
 
 for(i=0;i<8;i++)//programology content
 {
 if(gender[i]=='m')
 {
 a++;
 }
 //programology content
 }
 cout<<a;
}

write name using character Array C++


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 char name[100];int i=0;
 
 for(i=0;i<10;i++)//set loop to the number which are dere in you name like "john"
 //needs to run the code 4 times 
 {
 cout<<"enter name letter no. programology content"<<i+1<<endl;
 cin>>name[i];
 }
 //programology content
cout<<"your name is "<<name<<endl;
 
 return 0;
}

C++ program to read the elements of character Array


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 char gender[]={'m','f','m','m','m'};
 
 cout<<gender;
}

C++ program to find the sum using Array


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 int list[100];
 int i=0,j=0,temp=0,sum=0;
 
 cout<<"enter list of element "<<endl;
 for(i=0;i<5;i++)
 {
 cin>>list[i];
 }
 for(i=0;i<5;i++)
 {
 sum=sum+list[i];
 }
//programology content
 cout<<sum<<endl;
return 0;
}

C++ program to print Circular Prime Numbers


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include<iostream>
#include<cmath>
using namespace std;
int fl;
int prime(int n)
{
 int i;
 i=n-1;
 while(i>=2)
 {
 if(n%i==0)
 {
 fl=1;//programology 
 }
 i--;
 }
 }
 
 int rotate(int a)
 {
 int b,c,d,e,i,j,k,s,z,v,x[8],y[8],m;
 b=a;
 i=0;
 while(b>0)
 {
 y[i]=b%10;
 b=b/10;
 i++;
 }
 c=0;
 for(j=i-1;j>=0;j--)
 {
 x[c]=y[j];
 c++;
 }
 m=i;
 while(m>0)
 {
 c=m-1;
 d=i-1;
 e=0;
 s=0;
 while(e<i)
 {
 z=pow(10,d);
 v=z*x[c%i];
 c++;
 d--;
 e++;
 s=s+v;
 }
 m--;
 prime(s);
 }
 }
 
 int main()
 {
 
 int i=2;
 
 
 while(i<=10000)
 {
 fl=0;
 rotate(i);
 if(fl==0)
 {
 cout<<i<<endl;
 }
 i++;
 } 
 
return 0;
}

C++ program to print inverted triangle


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include<iostream>
using namespace std;
int main()
{
 int i,j,k,l,m;
 for(i=0;i<=5;i++)
 {
 for(k=65;k<=69-i;k++)
 cout<<(char)k; 
 
 for(j=1;j<=i*2-1;j++)
 cout<<" ";
 
 for(l=69-i;l>=65;l--)
 if(l!=69)
 cout<<(char)l;
 cout<<endl;
 }
 
 return 0;
}

a.png

C++ program to print prime numbers not divisible by 3 and 7


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

Write a C++ program that prompts the user to input a positive integer, n. It should then output the first n prime numbers that are not divisible by 3 and 7. (Note: An even number is prime if it is 2. An odd integer is prime if it is not divisible by any odd integer less than or equal to the square root of the number.)

#include <iostream>
using namespace std;
int main()
{
 int num;
 int sum;
 int i;
 int j;
 int flag;
 
 cout<<"please enter number //programology content"<<endl;
 cin>>num;
 
 
 
 for(i=2;i<=num;i++)
 {
 flag=0;
 
 for(j=2;j<i;j++){
 
 
 if(i%j==0)
 {
 flag=1;
 }
 }
 //programology content
 
 if(flag==0)
 {
 if(i%3!=0 && i%7!=0)
 {
 cout<<i<<endl;
 }
 }
 }
}

C++ program to print Dokki Series using Array


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

Explanation:

program will print next numbers in the amount which is printed previously to that number like

1 program showing 1

for 2

program output

1

2

for 3

program output

1

2

3

for 4

program output

1

2

3

4

so on…

descending order using array

 

#include <iostream>
using namespace std;
int main()
{
 int list[50],i=0,j=0,temp=0;
 
 cout<<" enter list of 10 numbers programology content "<<endl;
 
 for(i=0;i<10;i++)
 {
 cin>>list[i];
 }
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 if(list[i]>list[j])
 {
 cout<<" "<<list[j]<<endl;
 }
 }//programology content
 }
}

C++ program to print elements in Descending Order


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh


#include <iostream>
using namespace std;
int main()
{
 int i=0;
 int list[50];
 int j=0,temp=0;
 
 
 cout<<"enter list of 10 numbers programology content"<<endl;
 
 
 for(i=0;i<10;i++)
 {
 cin>>list[i];
 
 }//programology content
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 if(list[i]>list[j])
 {
 temp=list[i];
 list[i]=list[j];
 list[j]=temp;
 }
 }
 
 }
 for(i=0;i<10;i++)
 {
 cout<<" "<<list[i]<<endl;
 }
}

C++ program to sort Array in descending order


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 int i=0;
 int list[50];
 int j=0,temp=0;
 
 
 cout<<"enter list of 10 numbers programology content"<<endl;
 
 
 for(i=0;i<10;i++)
 {
 cin>>list[i];
 
 }//programology content
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 if(list[i]>list[j])
 {
 temp=list[i];
 list[i]=list[j];
 list[j]=temp;
 }
 }
 
 }
 for(i=0;i<10;i++)
 {
 cout<<" "<<list[i]<<endl;
 }
}

C++ program to sort elements in Ascending order using Array


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 int list[50],i=0,j=0,temp=0;
 
 cout<<"enter list of 10 numbers programology content"<<endl;
 
 for(i=0;i<10;i++)
 {
 cin>>list[i];
 }
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 if(list[i]<list[j])
 {
 temp=list[i];
 list[i]=list[j];
 list[j]=temp;
 }//programology content
 }
 }
 for(i=0;i<10;i++)
 {
 cout<<"ascending order "<<list[i]<<endl;
 }
}

C++ program to sort an array in Ascending order


#PROGRAMOLOGY is a student interest site providing best possible
* SOURCE CODES
* PROGRAMMING MCQ’S
* PROGRAMMING BOOKS
* FREQUEnTLY ASKED C++ PROGRAMMING INTERVIEW QUESTIONS
CURRENTLY we are working on C++ PROGRAMMING in addition we are thinking about JAVA AND SCRATCH as well
//DO SUGGEST PLEASE..
GRAB AUTHOR ON
https://www.fiverr.com/am10shiekh

#include <iostream>
using namespace std;
int main()
{
 int list[50],i=0,j=0,temp=0;
 cout<<"enter list of arrays programology content"<<endl; 
 for(i=0;i<10;i++)
 {
 cin>>list[i];
 }
 for(i=0;i<10;i++)
 {
 for(j=0;j<10;j++)
 {
 if(list[i]>list[j])
 {
 temp=list[i];
 list[i]=list[j];
 list[j]=temp;
 }
 }
 }
 for(i=0;i<10;i++)
 {
 cout<<"ascending order "<<list[i]<<endl;
 }
return 0;
}