- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 6
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 1
15 Posted Topics
plz help me..with the program for two wire intercom using embedded c program in atmega8
#include<stdio.h> #include<conio.h> void main() { int flag=0; int a=11,i,temp,temp=a; for(i=1;i<=temp;i++) { if((a%i)==0) {flag++; } } if(flag==2) { printf("prime"); }
starting with c is not a tough job yet,there needs a hardwork.for new learners learn c by balagurusamy and let us c by yeswant kanikar may be useful.
I think using arrays would be a better choice as atulgupta suggested.
#include<stdio.h> #include<conio.h> void main() { int flag=0; int a=11,i,temp,temp=a; for(i=1;i<=temp;i++) { if((a%i)==0) {flag++; } } if(flag==2) { printf("prime"); }
#include<stdio.h> #include<conio.h> void main() { int flag=0; int a=11,i,temp,temp=a; for(i=1;i<=temp;i++) { if((a%i)==0) {flag++; } } if(flag==2) { printf("prime"); }
#include<stdio.h> #include<conio.h> void main() { int flag=0; int a=11,i,temp,temp=a; for(i=1;i<=temp;i++) { if((a%i)==0) {flag++; } } if(flag==2) { printf("prime"); }
AS all others aid for loop can be made while. //syntax for for(initialisation;condition;increment/decrement) { } //syntax while //initialisation while(condition) { inc/decrement; } hope you understand
The program you gave was not really dealing with int and char.Here only cout plays a picture,that is whatever typed in cout will be the answer.declarations of int and char is not used in your program.The output of your program would be **ok** for both the case. The basic difference …
ya pritam.das was correct,if u need i would provide you the same program in c language.?!
getch() is a predefined function that is used with the header file #include<conio.h> where conio stands for console input and output.This can be used both in c and c++. Using getch which consists of two words get,ch that is get the character.It is always used at the end of the …
AS everyone ssaid here c does doesnot allow function overloading,only c++ which uses the concept of oops that is object oriented programming language has the special feature called function overloading.Better try your program with c++ saving it with a .cpp extension.
Here in this code you will get the output as the remainder.That is, for example 10/5 implies output(quotient)=2,where as 10%5 implies output(remainder)=0. I think you get a better idea about %.similar to the example 10/20=0(since i is an integer,if i is float 10/20=0.5)and** 10**%20 yields the same **10 **(as 10 …
As every one said here the iostream stands for the input and output and their flow.For the use of the input and output in a program first we have to use this. #include<iostream> is an header file that is used in c++ in order to include the library files that …
C++ USES THE CONCEPT OF OOPS-MEANS OBJECT ORIENTED PROGRAMMING THAT INCLUDES MANY NEW FEATURES LIKE POLYMORPHISM,INHERITANCE,CLASSES,FUNCTION OVERLOADING,AND IT USES A SPECIAL THING CALLED AS OBJECTS. THERE IS NO MUCH DIFFERENCES IN THE THEORY PART EXCEPT THIS EXTRA FEATURES,HOWEVER C++ PROGRAMMING IS WITH SOME DIFFERENCES LIKE THE HEADER FILES OF C..STDIO.H …
The End.