Find sum of array elements
// Find the sum of array elements.#include <stdio.h>#include <conio.h>#include<math.h>void main(){ int a[5], i, sum; // Assigning values to array. printf("Enter Enter t...
#To check whether the input number is prime or not try: #It runs if the input is an integer a=int(input('Enter a natural number greater than 1')) if a>1: for b in range(2,a): if(a%b)==0: print(a,'is not a prime number') break else: print(a, 'is a prime number') else: print('Please enter a valid number') except ValueError: #If the user is naughty and enters other than an integer print('Please enter a valid number')