تبلیغات
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی - برنامه ی حذف space
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی
دانلود رایگان سورس پروژه
سایت برنامه نویسی تک کدر takcoder.ir


آموزش برنامه نویسی با استفاده از نوین ترین روش و ارائه پروژه های نمونه و مجموعه عظیم سورس کدهای آماده برای شما دوستان

مدیر سایت : Yahya Taherzadeh
نویسندگان
نظرسنجی
زبان برنامه نویسی مورد علاقه شما؟






یه تمرین برای رشته های کاراکتری:

برنامه ای بنویسید که یک متن از ورودی گرفته و تمامی space های آن را (در صورت وجود) حذف کرده و آرایه ی کاراکتری جدید را چاپ نماید.
#include <iostream.h>
#include <conio.h>

void main()
{
    char ch[100];
    int c,space=0;
    cout<<"Enter a string: ";
    cin.get(ch,100);
    for(int i=0;ch[i]!=0;i++)
        if(ch[i]==32)
        {
            space++;
            for(c=i;ch[c+1]!=0;c++)
                ch[c]=ch[c+1];
        }
    i-=space+1;
    for(c=0;c<=i;c++)
        cout<<ch[c];

cout<<"\n\n";
}





نوع مطلب : آموزش، پروژه های رایگان، تیکه کد، سی| سی پلاس پلاس، 
برچسب ها : space، فاصله، حذف space، حذف فاصله، متن، رشته، رشته های کاراکتری،
لینک های مرتبط :
Yahya Taherzadeh
چهارشنبه 20 آذر 1392
دوشنبه 16 مهر 1397 07:37 ب.ظ
Nice blog here! Also your website loads up fast!
What web host are you using? Can I get your affiliate link to your host?
I wish my web site loaded up as fast as yours lol
دوشنبه 16 مهر 1397 03:52 ب.ظ
It's remarkable to visit this site and reading the views of all mates on the topic
of this piece of writing, while I am also zealous of getting experience.
دوشنبه 16 مهر 1397 05:12 ق.ظ
I've been browsing online more than three hours
today, yet I never discovered any interesting article
like yours. It is pretty price sufficient for me.
Personally, if all webmasters and bloggers made excellent content material as you probably did,
the internet might be a lot more useful than ever
before.
دوشنبه 9 مهر 1397 06:51 ب.ظ
Hi there, I discovered your site by means of Google even as looking for a comparable matter, your site came up, it appears great.
I've bookmarked it in my google bookmarks.
Hello there, just become aware of your weblog through Google, and located that it's really
informative. I am gonna be careful for brussels.
I will appreciate for those who continue this in future. A lot
of people can be benefited from your writing.
Cheers!
دوشنبه 9 مهر 1397 06:01 ب.ظ
Greetings I am so grateful I found your weblog, I really found you by accident, while I was searching on Yahoo for something else, Anyways I am here now and would just like
to say many thanks for a marvelous post and a all round
entertaining blog (I also love the theme/design), I don’t have time
to read through it all at the minute but I have saved it and also added in your RSS feeds, so when I have time I will be
back to read more, Please do keep up the superb work.
دوشنبه 9 مهر 1397 03:14 ب.ظ
Informative article, exactly what I was looking for.
دوشنبه 9 مهر 1397 05:23 ق.ظ
Hello all, here every one is sharing these know-how, thus it's good to read this web site,
and I used to pay a quick visit this website all the time.
جمعه 6 مهر 1397 06:36 ب.ظ
Hey, I think your site might be having browser compatibility issues.

When I look at your blog in Firefox, it looks fine but when opening
in Internet Explorer, it has some overlapping. I just wanted to give you a
quick heads up! Other then that, excellent blog!
سه شنبه 3 مهر 1397 04:14 ق.ظ
Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter
and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and
screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this
is completely off topic but I had to tell someone!
جمعه 6 مرداد 1396 08:38 ب.ظ
I loved as much as you will receive carried out right here.
The sketch is tasteful, your authored subject matter stylish.
nonetheless, you command get bought an impatience over that you wish be delivering the following.
unwell unquestionably come more formerly again as exactly the same
nearly a lot often inside case you shield this increase.
پنجشنبه 22 تیر 1396 05:01 ق.ظ
I'll right away seize your rss feed as I can't find your email subscription link or newsletter
service. Do you've any? Kindly permit me know so that I may subscribe.
Thanks.
دوشنبه 12 تیر 1396 11:56 ق.ظ
We're a gaggle of volunteers and opening a brand new
scheme in our community. Your website offered us with helpful information to
work on. You have done an impressive activity and our entire neighborhood might be
grateful to you.
یکشنبه 11 تیر 1396 09:31 ق.ظ
This is the perfect blog for anybody who wishes to find out about this topic.
You understand so much its almost tough to argue with you (not that I
personally will need to?HaHa). You certainly put a fresh spin on a topic
that has been discussed for many years. Great stuff, just wonderful!
شنبه 3 تیر 1396 04:10 ب.ظ
Loving the info on this internet site, you have done outstanding job on the articles.
چهارشنبه 31 خرداد 1396 10:37 ب.ظ
Hey very cool web site!! Guy .. Excellent ..
Superb .. I'll bookmark your site and take the feeds additionally?

I'm happy to find a lot of helpful information right here in the submit, we'd like
develop more techniques on this regard, thank you for sharing.
. . . . .
شنبه 16 اردیبهشت 1396 05:56 ب.ظ
Hi there! Someone in my Facebook group shared this site with us so I came to give it
a look. I'm definitely enjoying the information. I'm bookmarking and will be tweeting this
to my followers! Superb blog and amazing design.
چهارشنبه 13 اردیبهشت 1396 05:53 ب.ظ
Hey there! This is my 1st comment here so I just wanted to give a quick shout
out and say I really enjoy reading your articles. Can you suggest
any other blogs/websites/forums that go over the same
topics? Appreciate it!
چهارشنبه 13 اردیبهشت 1396 05:40 ب.ظ
Great blog right here! Also your website lots up fast!
What web host are you the usage of? Can I am getting your associate hyperlink in your host?
I desire my website loaded up as quickly as yours lol
شنبه 9 اردیبهشت 1396 03:08 ب.ظ
Glad to be one of many visitors on this awful site :D.
جمعه 1 اردیبهشت 1396 04:31 ب.ظ
It's going to be end of mine day, however before end I am reading
this impressive post to improve my knowledge.
یکشنبه 27 فروردین 1396 11:55 ب.ظ
This is my first time visit at here and i am really impressed to
read everthing at one place.
جمعه 25 فروردین 1396 07:41 ب.ظ
For newest news you have to go to see internet and on web I found this website
as a best site for latest updates.
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر




صفحات جانبی
آمار وبلاگ
تاییدیه پرداخت
تبلیغات
به سایت تک کدر خوش آمدید