0% found this document useful (0 votes)
12 views2 pages

Practical File Format Sample C Programming

This document describes a simple C program that performs formatted input and output using printf() and scanf(). The program prompts the user to enter two integer values, calculates their sum, and displays the result. It is designed to be run in Visual Code and includes the source code for reference.

Uploaded by

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

Practical File Format Sample C Programming

This document describes a simple C program that performs formatted input and output using printf() and scanf(). The program prompts the user to enter two integer values, calculates their sum, and displays the result. It is designed to be run in Visual Code and includes the source code for reference.

Uploaded by

palak.mishra.del
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PROGRAM NO: 1

/*Program to perform formatted output using printf( ) and input


using scanf( ). */

Software Used : Visual Code


Source Code:

#include<stdio.h>
int main(){
int a,b;
printf("\n Enter the first value:");
scanf("%d”, &a);
printf ("\n Enter the second value:");
scanf("%d”, &b);
int sum=a+b;
printf("\n The sum of a and b is %d",sum);
return 0;
}

1
OUTPUT

You might also like