تبلیغات
پروژه های رایگان برنامه نویسی و آموزش زبان C++ و C# - تبدیل عدد در مبنای 10 (Decimal) به مبنای 16 (Hexadecimal)
 
برنامه بدون خطا رویاست Program is impossible without an error
پروژه های رایگان برنامه نویسی و آموزش زبان C++ و C#
صفحه نخست         تماس با مدیر         پست الکترونیک        RSS         ATOM
 
 

این سورس برای تبدیل عدد در مبنای 10 (Decimal) به مبنای 2  (Hexadecimal) نوشته شده است

 

#include <stdio.h>
#define max 10

void Hex(int);


main(){
 int s16[max],tmp,j=0;

 printf("\n Decimal --> Hexadecimal");
 printf("\n\n Enter a Number(Right --> 245): ");
 scanf("%d",&tmp);

             
 while(tmp>=16){                   
  s16[j++]=tmp%16;                
  tmp/=16;                       
 }                                  
 j--;

 printf("\n\n HexaDecimal = ");
 Hex(tmp);
 for(j;j>=0;j--)
   Hex(s16[j]);

}
//***************************************************************************
void Hex(int x){
 switch(x){
   case 10: printf("%c",'A'); break;
   case 11: printf("%c",'B'); break;
   case 12: printf("%c",'C'); break;
   case 13: printf("%c",'D'); break;
   case 14: printf("%c",'E'); break;
   case 15: printf("%c",'F'); break;
   default: printf("%d",x);
  }
}

 

 





نوع مطلب : پروژه های برنامه نویسی ++C، 
برچسب ها : تبدیل مبنا،
لینک های مرتبط :


پنجشنبه 20 مهر 1396 10:15 بعد از ظهر
Hi there, always i used to check blog posts here in the early hours in the daylight, as i like to find out more and more.
پنجشنبه 20 مهر 1396 08:41 بعد از ظهر
hey there and thank you for your info – I have definitely picked
up something new from right here. I did however expertise several technical issues using this site, as I experienced to reload the web site lots of times previous to I
could get it to load correctly. I had been wondering if your
hosting is OK? Not that I'm complaining, but slow loading instances times will sometimes affect your placement in google and can damage your high quality score if ads and marketing with Adwords.
Well I'm adding this RSS to my email and could look out for much more of your respective exciting content.

Ensure that you update this again very soon.
پنجشنبه 20 مهر 1396 08:36 بعد از ظهر
When someone writes an post he/she retains the plan of a user in his/her
brain that how a user can understand it. So that's why this
article is perfect. Thanks!
پنجشنبه 20 مهر 1396 08:24 بعد از ظهر
Write more, thats all I have to say. Literally,
it seems as though you relied on the video to make your point.
You obviously know what youre talking about, why waste your intelligence
on just posting videos to your weblog when you could be giving us something enlightening to read?
پنجشنبه 20 مهر 1396 08:03 بعد از ظهر
Nice post. I learn something new and challenging on sites
I stumbleupon everyday. It will always be interesting to read through articles from other writers and use a little something from their websites.
پنجشنبه 20 مهر 1396 07:57 بعد از ظهر
I'm amazed, I have to admit. Seldom do I encounter a blog that's both educative and amusing, and without a doubt, you've hit the nail on the
head. The problem is an issue that too few people are speaking intelligently about.
I am very happy I found this in my search for something relating to this.
پنجشنبه 20 مهر 1396 07:51 بعد از ظهر
I've read some just right stuff here. Definitely worth bookmarking for revisiting.
I wonder how so much effort you set to create this kind of wonderful informative website.
پنجشنبه 20 مهر 1396 07:42 بعد از ظهر
My brother recommended I might like this website.
He was totally right. This post truly made my day. You cann't imagine simply how much time I had spent
for this information! Thanks!
پنجشنبه 20 مهر 1396 07:19 بعد از ظهر
I would like to thank you for the efforts you have put in writing this website.

I am hoping to view the same high-grade content by you later on as well.
In truth, your creative writing abilities has encouraged me to
get my very own website now ;)
پنجشنبه 16 شهریور 1396 07:10 قبل از ظهر
I'm truly enjoying the design and layout of your
site. It's a very easy on the eyes which makes it much more pleasant for
me to come here and visit more often. Did you hire out a
designer to create your theme? Exceptional work!
دوشنبه 16 مرداد 1396 05:11 قبل از ظهر
Greetings! I know this is somewhat off topic but I was wondering which blog platform are you using for this site?
I'm getting tired of Wordpress because I've had issues with hackers and I'm looking at alternatives for another platform.
I would be fantastic if you could point me in the direction of a good platform.
چهارشنبه 6 اردیبهشت 1396 04:16 بعد از ظهر
Why visitors still make use of to read news papers when in this technological globe
the whole thing is presented on net?
دوشنبه 4 اردیبهشت 1396 06:20 قبل از ظهر
Good post. I learn something totally new and challenging on sites I stumbleupon on a daily basis.
It's always interesting to read through content from other authors
and practice something from other sites.
چهارشنبه 27 مهر 1390 09:30 قبل از ظهر
salam mikhastam tooin barnamehaye c++ behem komak konid:
برنامه ای که عدد 5 رقمی را از مبنای 4 به 10 ببرد
برنامه ای که خرو جیش به این شکل باشد:من خلا صه نوشتم تا عدد 21 ادامه د اره


1
3 2
6 5 4
سجاد سلطانیsallam

motasefane wagt nadaram
سه شنبه 4 خرداد 1389 12:02 بعد از ظهر
salam,2nbale ye proje C am,va3 taghiire mabna
plz help me:((
چهارشنبه 9 دی 1388 12:00 قبل از ظهر
misheh code tabdil mabna az 8 be 2 ro bezari



tanks
سه شنبه 10 آذر 1388 02:38 بعد از ظهر
سلام دوست عزیز
چقدر خوب شد وبلاگتو پیدا کردم
من شدیدا به یه پروژه به زبان سی نیاز دارم؛اگر می تونی کمکم کن چون هفته آینده باید تحویل بدم
شماره من 09357726015
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر


درباره وبلاگ

انجام پروژه های برنامه نویسی سی و سی پلاس پلاس و سی شارپ

انجام پروژه های الکترونیکی و رباتیکی

مدیر وبلاگ : سجاد سلطانی
مطالب اخیر
نویسندگان
جستجو

آمار وبلاگ
کل بازدید :
بازدید امروز :
بازدید دیروز :
بازدید این ماه :
بازدید ماه قبل :
تعداد نویسندگان :
تعداد کل پست ها :
آخرین بازدید :
آخرین بروز رسانی :














free counters
X بستن تبلیغات
X بستن تبلیغات