Read two floating points' values of double precision A and B, corresponding to two student's grades. After this, calculate the student's average, considering that grade A has weight 3.5 and B has weight 7.5. Each grade can be from zero to ten, always with one digit after the decimal point. Don’t forget to print the end of line after the result, otherwise you will receive “Presentation Error”. Don’t forget the space before and after the equal sign.

আমার প্রোগ্রামঃ

int main()
    double a, b, MEDIA;
    scanf("%lf %lf",&a, &b);

    MEDIA = (a+b)/2.0;
    printf("PROD = %.5lf\n",MEDIA);

    return 0;

asked 30 Apr '16, 14:26

SadhonRay's gravatar image


edited 30 Apr '16, 17:41

Kaiser%20Ahmed's gravatar image

Kaiser Ahmed

Give your code link :) I think it is a problem of URI. problem no. 1005 .Your code isn't right. :) check out properly

permanent link

answered 30 Apr '16, 16:30

Zahirul_Islam_Monir's gravatar image


edited 30 Apr '16, 16:33


Your answer should be like this:


int main() { float a,b; double avg; scanf("%f%f",&a,&b); avg = (a3.5+b7.5)/(3.5+7.5); printf("MEDIA = %.5lf\n",avg); return 0; }

permanent link

answered 30 Apr '16, 18:07

Mahmud%20Hossain's gravatar image

Mahmud Hossain

edited 30 Apr '16, 18:21

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 30 Apr '16, 14:26

question was seen: 1,800 times

last updated: 30 Apr '16, 18:21