0% found this document useful (0 votes)
28 views12 pages

Introduction To Programming

Uploaded by

hazemmohummed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views12 pages

Introduction To Programming

Uploaded by

hazemmohummed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Introduction to Programming Concepts CSIT120

Project

List of Student names


Id
Section number
The Problem

Bob would like to know what percentage of his


income his rent is. Write a solution
that would calculate and print this percentage.
(Hint: Percentage = *100)
Step1: The problem analysis chart
Processing Required Given Data
1. Percentage = *100 1. Number
2. Total

Solution alternatives Required Results


1. Define Number and Total as constant. 1. displays the Percentage
2. Define Number and Total as input value.
Step2: The interactivity chart

CalculationControl

Read Calc print


Step3: The IPO chart
Module or
Output Processing input
reference
read Enter
read Enter
calc Calculate C
percentage of
print Print Percentage
income rent
CalculationControl End
Step4: The algorithms
1. Starts
2. Enter the Number(I/O)
3. Enter the Total (I/O)
4. Calculate Percentage(process)
5. Print Percentage(I/O)
6. End
Step5: The Flowchart
Start

Read
Nmber

Read
Total

Percentage= (Nmber /Total)*100

Print
Percentage

End
Step6: The pseudocode
₋ begin
₋ input Number
₋ Input Total
₋ Percentage= (Number /Total)*100
₋ Print Percentage
₋ End
Step7: The coupling diagram
calculationControl

Percentage
Number

Pe
Total
er

rce
mb

al
Tot

nta
Nu

ge
Read Calculate Output
Step8: The data dictionary
Variable
Scope Module Data Type Item
name
local Read/caulation float num Number
local Read/caulation float Totl Total
local print/caulation float avg Percentage
Step9: The C Program
#include<stdio.h>
#include<conio.h>
main()
{
clrscr();
float num,avg,totl;
printf("enter Number \n");
scanf("%f",&num);
printf("enter Total \n");
scanf("%f",&totl)
avg= (num/totl)* 100 ;
printf("percentage of income rent =%f\n", avg);
}

You might also like