Answer:
#include <iostream>
# include <conio.h>
using namespace std;
main()
{
int size;
cout<<"enter the size of array";
cin>>size;
int a[size],b[size];
for (int i=0;i<size;i++)
{
cout<<"enter the value in array a"<<i;
cin>>a[i];
}
for (int k=0;k<=size;k++)
{
{
if (a[k]%2==0)
{
for (int l=k; l<=size;l++)
{
a[l]=a[l+1];
}
size=size-1;
}
}
}
cout<<"\nArray list without even";
for(int j=0;j<size+1;j++)
{
cout<<"\n"<<a[j];
}
getch();
}
Explanation:
There is an array taken of variable size, the program has been written to delete the even elements from the array list. In this program "size " is the integer variable that is taken to mention the total elements of the array. Then enter the values on different index of array.
After that program find the even values and then delete these values. After the operation new array will be displayed on output.
Answer:
Breaking it down I guess for me, you could take down all the possible things that you could do. Eliminating things, one by one. It could help working on a computer by not letting yourself get over-whelmed by all your programming and thinking "alright, this THEN this."
Explanation:
Answer:
Answer written in python.
Explanation:
#ask user for the first integer.
first_number = int(input("enter first number: "))
#ask user for the second integer
second_number = int(input("enter second number: "))
#add both and store in a variable, result.
result = first_number + second_number
#print out the result
print ( f"the answer to the problem is {result} calculated by adding {first_number} to {second_number}")
The worded lines after the # sign are called comments and are used to describe what the following lines of code does making it easier to read and understand by other programmers or by the same programmer coming back to it after a while.