-1
The result of division is only zero, which is wrong?
#include <stdio.h>
void main()
{
double Nota1, Nota2, MediaPond;
printf("Escreva a nota 1: ");
scanf("%f", &Nota1);
printf("\nEscreva a nota 2: ");
scanf( "%f", &Nota2 );
MediaPond = ((Nota1 * 2) + (Nota2 * 3)) / 5;
printf("\nA media ponderada e: ");
printf("%.2f", &MediaPond);
system("pause");
}
This is the return of the program
Write the note 1: 2
Write note 2: 5
The weighted average is: 0.00
Do you know you can only accept one answer? You can vote for all you want on the entire site, but only accept one answer to your question. It’s OK to accept any one you think is the right one, but many users end up changing the acceptance thinking they can accept more than one, so when they accept a new one and stop accepting the other one. If you did it because you wanted to, no problem, if you did it by mistake it would be good to review.
– Maniero