Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- using namespace std;
- int main(){
- int num,i,suma=0,cantidad;
- clrscr();
- printf("Promedio de numeros sumados: ");
- scanf("%d",&num);
- for(i=1;i<=num;i++)
- {
- printf("Numero: ");
- scanf("%d",&cantidad);
- suma=suma+cantidad;
- }
- suma=suma/num;
- printf("el promedio es xD: %d",suma);
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement