print(lab)

Upload: giezel-revis

Post on 04-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 PRINT(LAB)

    1/4

    1. Write a program that reads a list of a 10numbers from the keyboard & output the

    following:

    a. Find and print the sum and average of allinteger.

    b. Find and print the sum and average of allpositive integer.

    c. Find and print the largest and smallestnumber.

    d. Count the number between 30 and 90.#include

    #include

    #include

    main()

    {

    int n, i, L, S,count=0,nu=0,de=0,summ=0,a1,b1,c1,c2,d;

    float ave, a2,b2;

    cout=30 && nn;

    summ+=n;

    if(n>=0)

    {

    nu+=n;

    de++;

    }

    if(n>=30 && n

  • 8/13/2019 PRINT(LAB)

    2/4

    {

    if(n%x==0)

    cout

  • 8/13/2019 PRINT(LAB)

    3/4

    int x,y,c,r,u,v;

    char z,n,i;

    //firstloop

    c=0;r=0;

    for(x=1;x

  • 8/13/2019 PRINT(LAB)

    4/4

    {

    gotoxy (c,r);

    cout