Skip to main content

Posts

Finding the arithmetic operators

Below is a very simple program to find the arithmetic operator. Please feel free to put a comment if need an explanation. #include #include void main()   {     float a1,a2;     char operator;     printf("\n Enter the values of a1 operator a2\n");     scanf("%f%c%f",&a1,&operator,&a2);     switch(operator)      { case '+': printf("%.2f",a1+a2); break; case '-':  printf("%.2f",a1-a2);  break; case '*':  printf("%.2f",a1*a2); break; case '/':  if(a2==0)  printf("error\n");  else  printf("%.2f",a1/a2);  break; default: printf("unknown operatotr\n"); break;      }    }

Calculating the average of two numbers using C++

Though this site aims at understanding C language, I am writing a program for you in C++, to have a general idea about C++ too. A program in C++,to calculate the average of two numbers, which are entered by the keyboard while the execution of the program. Try to understand the program; #include &lt iostream &gt using namespace std; int main() {     float num1,num2,average,sum;     cout << "Enter the first number:";     cin >> num1;     cout << "Enter the second number:";     cin >> num2;     sum=num1+num2;     average=sum/2;     cout << "The sum of the two numbers is:"<< sum<<"\n"<<"The average of the two numbers is:" << average; return(0); } Explaination: The new file header used here in this C++ program is the #include . By this , we are asking the preprocessor to add the contents of the ...

C Reference app on Android

Android is one of the most rapidly growing mobile platform today. Most of us are opting for android devices , cell phones /tablets and so am I . While surfing around the Android Market (The place to download android apps) I came across an helpful app; " C Reference ".                                This app provides the reference to the standard C library. It also contains description of all the functions and macros in C, in a searchable from. This app could be very handy in while writing C programs.And the best part about this app is that , this app can be downloaded free from the android market. Screenshots: You can see and download this app from C Reference App

A C program to print the average of the numbers(Using While Loop)

Below is a program to print the average of two numbers that are input through the keyboard.   /* Read the numbers from the keyboard as input and * print out their average as output. */    #include &lt stdio &gt int main( ) { double x = 0.0, sum = 0.0; int count = 0; printf( "\t--- Calculate Average of the numbers ---\n" ); printf( "\nEnter the number you want to calulate average for:\n" "(Type a letter to end your input)\n" ); while ( scanf( "%lf", &x ) == 1 ) { sum += x; ++count; } if ( count == 0 ) printf( "No input data given!\n" ); else printf( "The average of given numbers is %.2f\n", sum/count ); return 0; } The output of the program:    

Turbo C++ for Windows 7 64 bit

 Its a very simple guide to install Turbo C++ on Windows 7 64 bit  operating system. Follow the steps below to install Turbo C++ compiler on your windows 7 ,64 bit operating system. Note - Please let me know whether the process is working for you or if you are getting some kind of error. Step 1) Install the software DOSBOX version 0.73(Search for it in the search bar). Step 2) Create a folder on your C drive, e.g.Turbo; (c:\Turbo\) Step 3) Extract TC into the created folder(e.g. c:\Turbo\);(you can search and download it) Step 4) Run the application DOSBOX 0.73,previously downloaded and installed. Step 5) Type the following commands at the command prompt that will appear, [z]: mount d c:\Turbo\ Following this you will get a message "Drive D is mounted as local directory c:\Turbo\" Step 6) Type d: to shift to d: Step 7) Then type commands mentioned below; cd tc cd bin tc or tc.exe Step 8) In the turbo C++ go to Options\Directories\ Chang...

Seminar Topics(100)

Excellent Seminar/Paper Presentation Topics for Students Put the desired topic name in search bar to get detail search about the topic. 1. 4G Wireless Systems 2. A BASIC TOUCH-SENSOR SCREEN SYSTEM 3. Artificial Eye 4. Animatronics 5. Automatic Teller Machine 6. Aircars 7. Adding interlligence to ineternet using satellite 8. ADSL 9. Aeronautical Communications 10. Agent oriented programing 11. Animatronics 12. Augmented reality 13. Autonomic Computing 14. Bicmos technology 15. BIOCHIPS 16. Biomagnetism 17. Biometric technology 18. BLUE RAY 19. Boiler Instrumentation 20. Brain-Computer Interface 21. Bluetooth Based Smart Sensor Networks 22. BIBS 23. CDMA Wireless Data Transmitter 24. Cellonics Technology 25. Cellular Positioning 26. Cruise Control Devices 27. Crusoe Processor 28. Cyberterrorism 29. Code division duplexing 30. Cellular Digital Packet Data 31. Computer clothing 32. Cordect WLL 33. CARBIN NANO TUBE ELEC...