Advertisement
Guest User

Untitled

a guest
Nov 8th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.67 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #define N 10
  4. int Somma(int s , int k);
  5. int LeggereVettore(int vettore[N]);
  6. int main(){
  7.     int a,b,totale,vet[N],i=0;
  8.     printf("Inserire uno numero: ");
  9.     scanf("%d", &a);
  10.     printf("\nInserisci il secondo numero: ");
  11.     scanf("%d", &b);
  12.     totale = Somma(a,b);
  13.     printf("La somma  =  %d:",  totale);
  14.     LeggereVettore(vet[N]);
  15.     return 0;
  16. }
  17. int Somma(int s , int k){
  18.     int somma;
  19.     somma = s +k;
  20.     return somma;
  21.  
  22. }
  23. int LeggereVettore(int vettore[N]){
  24.     int valore,i=0;
  25.     while(i<=N){
  26.     printf("\nInserisci un numero: ");
  27.     scanf("%d", &valore );
  28.     i=i+1;
  29.     return 0;
  30.  
  31.     }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement