Programming in C
Write a C program to delete blank spaces from a line of sentences input by the user:
#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{
char sen[150],c;
int i=0;
clrscr();
printf("enter any sentence:");
gets(sen);
puts("the sentence without any blank space is" );
while((c=sen[i++])!='\0')
{
if (c!=32)
printf("%c",c);
}
}
Dynamic allocation use gareko bhaye ali advanced dekhinthyo hola sayad
ReplyDeleteAnkura: Timi garera post garideu na ta...
ReplyDeleteLau bhayo ta aba Bichara malai po phasayo Harey!!!!
ReplyDeleteWrite a C program to find whether the given number is prime or composite...
ReplyDelete#include
#include
void main()
{
int no,i;
clrscr();
printf(" Enter the Number U want to check:");
scanf("%d",&no);
i=2;
while(i<=no-1)
{
if(no%i==0)
{
printf(" %d is not Prime number",no );
break;
}
i=i+1;
}
if(no==i)
printf("%d is a prime Number",no);
getch();
}