Solution For C Program -
Given a numerical value, check if at least one of the elements of the vector is equal to the numerical value if so, say where in the negative case, say that there is no.
#include <stdio.h>int trova_elemento(int a){
int vettore[]={7,17,436,1,436,246,753,32,446,375486,52,1,45,7};
int i;
int trovato;
trovato=0;
for(i=0; i<14 && trovato==0; i++){
if(a==vettore[i]){
trovato=1;
printf("L'elemento %d è stato trovato ed è in posizione %d\n", a, i+1);
}
}
if(trovato==0)
printf("L'elemento %d non esiste nel vettore\n", a);
return 0;
}
int main(void){
int elemento;
printf("Inserisci il numero da cercare nel vettore: \n");
scanf("%d", &elemento);
trova_elemento(elemento);
return 0;
}
Learn More :
Check
- CHECKING LEAP YEAR USING C PROGRAM.
- Check given number is prime number or not using c program.
- Write a c program to check given string is palindrome number or not.
- C program to Check While packet(s) hasn't been acked
- C Program to Check Prime Use Loop And Recursive
- C Program To Find The Length, Reverse Of A String And To Check It Is Palindrome or Not
- C Program To Check The Given Value Is Vowel
- C Function to Check Vowel
- C Program To Check Leap Year
- C Program To Check If It Is A Palindrome Numbers Or Not
- C Program to Check if a number is in an array[1000]
- Armstrong Number Checker in C
- C Program to Check Given String is Palindrome or Not
- C Program to Check Whether Number Is Perfect Or Not
- C Program To Alarm Check
- C Program To Read A Parenthesised Infix Expression From The User And Check Whether It Is Well Parenthesised Or Not
- Input a Number and Check if it's Palindrome or not C Program
- Input Number and Check if it's Armstrong C Program
- Input Number and Check if it's Even or Odd C Program
Vector
- C program to Given a vector (integer or real), determine what is the maximum value of element what is the position in which this element is located
- C Program Friend & Operator: Vector Example
- C Program for distance vector algorithm to find suitable path for transmission
- Read 10 real numbers using a vector and show the least of them C Program
- C Program produsul scalar a doi vectori .
- C Program The dot product of two vectors
Element
- C program to Given a vector (integer or real), determine what is the maximum value of element what is the position in which this element is located
- Write the procedure , which is one of a sum , a product and a geometric average in the panel for the NxM elements are located on opposite diagonal and main diagonal . Remind ! Counting only odd elements !
- Napisać funkcję obliczającą funkcję geometryczną w tablicy NxM elementowej z elementów o wartościach parzystych znajdujących się pod główną i ponad przeciwną przekątną.
- C Program Array NxM Elements Geometric/Arithmetic
- C Program To Returns the nth element of the Fibonacci sequence.
- C Program to search an element using linear search or binary search (menu driven program)
- Fibonacci Multi Threaded C Program To Print Element Of Fibonacci Series
- C Program to accept n numbers from user & find out the maximum element out of them by using dynamic memory allocation
- C Program to accept m*n matrix from user and display the elements of given matrix using function
- C program to reverse an array elements using Dynamic Memory Allocation
- C Program to calculate the sum of elements of upper triangle of a n*n matrix using DMA
- C Program to accept n numbers from user store these numbers into an array & reverse an array elements using function
- C Program to accept 5 names from user & store these names into an array. Sort these array elements in alphabetical order
- Calculate sum of element of upper triangle of m*n matrix by using dynamic memory allocation
- Calculate sum of non-diagonal element in m*n matrix C Program
- Calculate sum of element of lower triangle of m*n matrix by using dynamic memory allocation
- C Program to Implemention Bubble Sort using array
- C Program to Create, Display, Insert and Deletion of Queue Elements
- Creation and Display of Elements in Both Forward and Reverse Direction in a Doubly Linked List
Numerical