A flow chart is a graphical or symbolic representation of a process. Those flow charts is designed specifically to help students visualize their algorithms or each step in the process and avoid syntactic baggage.
1) Flowchart for Addition of Two numbers
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | int A, B, C; Console.Write("Enter integer A:"); A = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter integer B:"); B = Convert.ToInt32(Console.ReadLine()); C = A + B; Console.WriteLine("The sum is "+C); Console.ReadLine(); |
2) Flowchart to Find Square of an Integer Number
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | int a,result; Console.Write("Enter an integer value :"); a= Convert.ToInt32(Console.ReadLine()); Console.Write("The given value is "+a); result = a * a; Console.Write("The square value is "+result); Console.ReadLine(); |
3) Flowchart to Read and Print String
C# Code:
1 2 3 4 5 6 7 8 9 10 | string name; Console.Write("Enter Name :"); name = Console.ReadLine(); Console.Write("The String is " + name); Console.ReadLine(); |
4) Flowchart for floor Function
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 | double x,output; Console.Write("Enter value for finding floor :"); x = Convert.ToInt32(Console.ReadLine()); output = Math.Floor(x); Console.WriteLine("Floor value is "+output); Console.ReadLine(); |
5) Flowchart to Perform Division Operation
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | float DD,DR,OUTPUT; Console.Write("Enter Dividend :"); DD = Convert.ToSingle(Console.ReadLine()); Console.Write("Enter Divisor :"); DR = Convert.ToSingle(Console.ReadLine()); OUTPUT = DD / DR; Console.WriteLine("The result is "+ OUTPUT); Console.ReadLine(); |
6) Flow chart to calculate Exponentiation
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | float root,power,output; Console.Write("Enter Base :"); root = Convert.ToSingle(Console.ReadLine()); Console.Write("Enter Power :"); power = Convert.ToSingle(Console.ReadLine()); output = Convert.ToSingle(Math.Pow(root, power)); Console.WriteLine("The exponentiation is "+ output); Console.ReadLine(); |
7) Flowchart to Find a Number is Even or Odd
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 | int number; Console.Write("Enter a number :"); number = Convert.ToInt32(Console.ReadLine()); if (number % 2 == 0) Console.WriteLine("The given number is even"); else Console.WriteLine("The given number is odd"); Console.ReadLine(); |
8) Flow Chart to Print All the Numbers up to a Given Number
C# Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 | int number,i; Console.Write("Enter a number :"); number = Convert.ToInt32(Console.ReadLine()); for (i = 0; i <=number; i++) { Console.WriteLine("The number is "+i); } Console.ReadLine(); |
Source:
https://www.programming9.com
https://www.edrawsoft.com/algorithm-flowchart-examples.php