Flowchart IICT

Objective: of this lab manual is to get familiar with the Flow chart. Different shapes used for designing flowchart its importance in computer science.
Background: The flow chart has its own criticality on the coding side. It explains the flow of control and structural design before implementing the code.
Pre-Lab: N/A
Assessment tools: The assessment is according to the student participation in the lab if the student solves the exercise, he will get the participation mark for this lab.
  Lab Assignments
 Q1: Calculate The interest of a Bank Deposit
Algorithm:
§  Step 1: Read amount,
§  Step 2: Read years,
§  Step 3: Read rate,
§  Step 4: Calculate the interest with formula "Interest=Amount*Years*Rate/100
§  Step 5: Print interest,

Q2: Determine and Output Whether Number N is Even or Odd
Algorithm:
§  Step 1: Read number N,
§  Step 2: Set remainder as N modulo 2,
§  Step 3: If the remainder is equal to 0 then number N is even, else number N is odd,
§  Step 4: Print output.

Q 3: Determine Whether a Temperature is Below or Above the Freezing Point
Algorithm:
§  Step 1: Input temperature,
§  Step 2: If it is less than 32, then print "below freezing point", otherwise print "above freezing point"
Q 4: Determine Whether A Student Passed the Exam or Not:
Algorithm:
§  Step 1: Input grades of 4 courses M1, M2, M3, and M4,
§  Step 2: Calculate the average grade with formula "Grade=(M1+M2+M3+M4)/4"
§  Step 3: If the average grade is less than 60, print "FAIL", else print "PASS".
a
Q5: write Algorithm for character predicator?

for help:


Submission Link:





9 Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Step 1: Input Value of a variable 6
    Step 2: Make a do while loop
    Step 3: Continue subtracting one from the variable
    Step 4: Print the result of variable
    Step 5: do it until the variable is greater or equal to zero

    ReplyDelete
  3. Sharafat ali
    406401

    22-Nov-2019
    #include
    using namespace std;
    void main()
    {
    int a=5;
    while(a>=1)
    {
    cout<<a<<endl;
    a--;
    }
    system("pause");
    }

    ReplyDelete
  4. Huzaifa khalid
    CMS 406172
    Q no 1 1-5 in reverse order
    #include
    using namespace std;
    int main()
    {
    int a=5;
    while(a>=1)
    {
    cout<<a<<endl;
    a--;
    }


    system ("pause");
    return 0;
    }

    ReplyDelete
  5. Muhammad Raza (A2)
    CMS 407291
    Q no 1
    #include
    using namespace std;
    int main()
    {
    int a=5;
    while(a>=1)
    {
    cout<<a<<endl;
    a--;
    }


    system ("pause");
    return 0;
    }

    ReplyDelete
  6. #include
    using namespace std;
    void main()
    {
    int a=12345, c=0,b;
    while(a != 0)
    {
    b = a%10;
    c= c*10 + b;
    a /= 10;
    }
    cout << c;
    system("pause");

    }

    abdullah wahid
    cms:406393

    ReplyDelete
  7. Algorithm of a program to print number in reversed order:

    1:Take 3 variables of integer type(number,remainder and reversed) that's is equal to 0.
    2:Print input required message on console.
    3:Take and store value in 1st variable (number).
    4:Use do_while loop with condition that is number is not equal to zero.
    5:In loop body we use 3 statements.
    6:1st one is take remainder of the entered number by 10 and store it in 2nd variable(remainder).
    7:2nd is to multiply the value of reversed variable by 10 and add into the value of remainder.
    8:3rd is to store value in variable (number) after divided by 10.
    9:Outside the loop body we print the value of variable (reversed).

    Sarmad hassan
    CMS#406323
    Section: A2

    ReplyDelete
  8. 1: Input Value of the variable
    2: Make a do while loop
    3: Continue subtracting one from the variable
    4: result of variable
    5: done it until the variable is greater or equal to zero


    cms 405678

    ReplyDelete
  9. Algorithm to take values from user and prove formula (ax2+bx+c=0):
    Step1: Take values of ‘a ,b’ from user.
    Step2: Take variable ‘x=0’.
    Step3: Calculate c=-(a+b).
    Step4: Take variable ‘result’ that is equal to the formula (a(x*x)+b(x)+c).
    Step5: Print the value of ‘result’.
    Sarmad hassan
    406324
    Section: A2

    ReplyDelete

Post a Comment

Previous Post Next Post