Beta Coder

Learn code like Beta Coder.

Breaking

Sunday, September 20, 2020

C Program to Concatenate two integer numbers

Concatenate two integer numbers

Concatenate two integer numbers
In this program we learn how to concatenate two integer numbers provided by user using C.
C program to concatenate two integer numbers
// Concatenate two integer numbers
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
	long a, b, n, c = 0;
	clrscr();
	printf("\n Enter two numbers : ");
	scanf("%ld%ld",&a,&b);
	n = b;
	do
	{
		n = n / 10;
		c++;
	}while(n != 0);
	a = a * pow(10, c) + b;
	printf("\n The concatenate number = %ld",a);
	getch();
}
OUTPUT:
   Enter two numbers : 30 47
   The concatenate number = 3047

1 comment:

  1. 1xbet korean 1xbet korean 1xbet korean 1xbet - Legalbet.co.kr
    1xbet korean 카지노 1xbet korean 온카지노 1xbet. 1xbet korean Sportsbook Betting, Online Casinos, Sports betting, Virtual Soccer, Betting, Sports betting.

    ReplyDelete