Mistrio_xp
- Stack Implementation In C
My code, compiles fine in GCC.. your advices are very welcomed since i'm a beginner /* * Stack.c * * Program to demonstrate the stack concept * * by Ahmed M. Sha'alan, disturbed@live.com, www.thedb.com/m */ #include <stdio.h> #include <stdlib.h> //for the syst…
- sorting numbers in a C array
أرجو توضيح *فكرة* (ليس الكود كله) ترتيب عدد من الارقام ascending order (تصاعدى) فى array بلC
- بديل scanf فالC
ابحث عن بديل للدالة scanf للC....
- ممكن أحد يصحح خطأي بالكود؟؟
صححته لك اخى.. #include <iostream> #include <string> using namespace std; class Mobile{ private: string colour; static const string make; const string model; public: Mobile(string c, string m): model(m) { colour = c; } void display() { cout << "colour: " << co…
- ممكن أحد يصحح خطأي بالكود؟؟
html++ :D هذا هو الكود من غير اكواد الhtml #include <iostream> #include <string> using namespace std; class Mobile{ private: string colour; static const string make; const string model; public: Mobile(string c, string m): model(m) { colour = c; } void display(…
- [تحدي] ألغاز برمجية
اقول لكم حاجة.. اعملوا التحديات مثل بعدد محدود من الvariables او ال#includes وهكاذا.. مثل اعمل برنامج يفعل كذا لكن ب 3 variables فقط.. it will be cooler :D
- [تحدي] ألغاز برمجية
وممكن كدا :P more efficient :D #include <stdio.h> int main() { int num,i, sum=0; printf("Please enter the # of numbers: "); scanf("%d",&i); for(;i>0;i--) { printf("Please enter number #%d: ",i); scanf("%d",&num); sum+=num; } printf("The total number is: %d\n",…
- [تحدي] ألغاز برمجية
#include <stdio.h> int main() { int loop,i,num, sum=0; printf("Please enter the # of numbers: "); scanf("%d",&loop); for(i=0;i<loop;i++) { printf("Please enter number #%d: ",i+1); scanf("%d",&num); sum+=num; } printf("The total number is: %d\n",sum); getch(); …
- أرجو توضيح ما الخطء فى هذا الكود
لم اعرف هذا.. شكراً جزيلاً للمعلومة :) لكن انا مسحت الأقواس و نجحت او ان تضع fflush(stdin) قبلها :P
- أرجو توضيح ما الخطء فى هذا الكود
وجدت الاخطاء (كما قال الأخ إسماعيل ابراهيم) وضعت fflush(stdin) قبل الscanf و وجدت انى وضعت %d للfloat شكرا لكم اخوانى والكود كاrefrence #include <stdio.h> #define H 0 #define F 25 #define T 30 #define Q 40 int main(void) { float price, x, newprice; char code; …
- أرجو توضيح ما الخطء فى هذا الكود
وضعتهم و اصبح الكود هكذا لكن نفس النتيجة :( .. (بالكومبيلر Mingw/GCC و borland c++) #include <stdio.h> #define H 50 #define F 40 #define T 33 #define Q 25 int main(void) { float price, x; float newprice; char code; printf("Please insert the price of the the ar…
- أرجو توضيح ما الخطء فى هذا الكود
#include <stdio.h> #define H 50 #define F 40 #define T 33 #define Q 25 int main(void) { float price, x; float newprice; char code; printf("Please insert the price of the the article: "); scanf("%f", &price); printf("Please insert the pricing code: "); scanf("%…