Q. If sum of two integer is 14 and if one of them is 8 then find other integer. Ans: Well, this is very simple. Simply, one integer is 8 and sum of two integers is 14. So, we need to subtract the number 8 from their sum of 14 to get the second number. So, the second number is: 14 - 8 = 6 C-Program of this task Code---> #include<stdio.h> int main () { int num1 = 8 , num2 , sum = 14 ; num2 = sum - num1 ; printf ( "The second number is: %d" , num2 ); return 0 ; }
In this C-program we will Scan and Print 5 numbers using Array. This is a simple Array program. The numbers will be taken from the user.
input:
5 numbers.(i.e : 5,6,9,56,548)output:
The given numbers by user will be printed on the screen.
CODE---->
#include<stdio.h>
#include<stdlib.h>
//This header file contains the system() function.
main()
{
int arr[5],i;
printf(" Enter Five numbers : ");
for(i=0;i<5;i++)
{
scanf("%d",&arr[i]);
}
printf("\n You have Entered these following numbers : \n");
for(i=0;i<5;i++)
{
printf(" %d\n", arr[i]);
}
system("pause");
//this function is called for pause the screen.
}
Such Nice a Working.Thanks For Sharing it.
ReplyDelete4k Video Downloader Crack
By Click Downloader Crack