//Programme for cheak 7th number is odd or evan using pointer

//Programme for cheak 7th number is odd or evan using pointer
#include<iostream>
using namespace std;
int main()
{
cout<<"enter 10 no.\n";

int a[10],b,*p,*q;
p=a;
q=&b;

for(int i=0;i<10;i++)
{
cin>>*(p+i);
}
if(*(p+6)%2==0)
cout<<"7th no. is evan";
else
cout<<"7th no. is odd";
}

No comments:

Post a Comment

programme for armstrong number for 3 digit in java

armstrong number import java.util.Scanner; class Mittu {     public static void main(String []args)     {         Scanner s=new Sca...