Site icon T4Tutorials.com

Program in C, C Plus Plus (CPP) to display the ASCII Values with flowchart

Program in C, C Plus Plus (CPP) to display the ASCII Values with the flowchart

In this tutorial, we will learn about the followings;

  1. Display the ASCII Values with the flowchart
  2. Program in C Plus Plus (CPP) to display the ASCII Values
  3. Program in C to display the ASCII Values with the flowchart

Display the ASCII Values with the flowchart

Figure: ASCII Value flowchart.

Program in C Plus Plus (CPP) to display the ASCII Values

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
	int num;
	char chara;
		cout<<"enter character:";
		cin>>chara;
		num=chara;
		cout<<"ASCII value of:"<<chara<<"="<<num;
		getch();
}

Output

ASCII Value program C

Program in C to display the ASCII Values with the flowchart

#include<stdio.h>
#include<conio.h>

int main()
{
	int num;
	char chara;
		printf("enter character:");
		scanf("%c",&chara);
		num=chara;
		printf("ASCII VALUE OF:%c= %d",chara,num);
		getch();
}

Output

Figure: ASCII Value program C.
Exit mobile version