This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
void main() | |
{ | |
int lim,sum,i; | |
clrscr(); | |
printf("Enter the limit"); | |
scanf("%d",&lim); | |
for(i=1,sum=0;i<=lim;sum=sum+i,i++) | |
printf("%d\n",i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define led 13 | |
int onTime=2000; | |
int offTime=1000; | |
unsigned long offStart=0; | |
unsigned long offEnd=0; | |
unsigned long onStart=0; | |
unsigned long onEnd=0; | |
boolean data=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define pin A0 | |
int data; | |
void setup() { | |
pinMode(pin,INPUT); | |
Serial.begin(9600); | |
} | |
void loop() { | |
data=analogRead(pin); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
void main() | |
{ | |
clescr(); | |
int n,i=2; | |
printf("Enter Limit \n"); | |
scanf("%d",&n); | |
top: | |
if(i<=n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
void main() | |
{ | |
char ch; | |
clrscr(); | |
printf("Enter a charator\n"); | |
scanf("%c",&ch); | |
switch(ch) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
void main() | |
{ | |
float a,b,res; | |
int dis; | |
clrscr(); | |
printf("Enter 2 number \n"); | |
scanf("%f%f",&a,&b); | |
printf("1- Add\n2- Sub\n3- Mul\n4- Div\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
void main() | |
{ | |
int a,b,dis; | |
printf("Enter 2 number\n"); | |
scanf("%d%d",&a,&b); | |
printf("Enter 1 for Addition\nEnter 2 For subtraction\n Enter 3 for Multliplication\nEnter 4 for Division"); | |
scanf("%d",&dis); | |
if(dis==1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
void main() | |
{ | |
int a,b,c; | |
clrscr(); | |
printf("Enter 3 number\n"); | |
scanf("%d %d %d",&a,&b,&c); | |
if(a>b) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define M1 10 | |
#define M2 11 | |
#define ENA 9 | |
void setup() | |
{ | |
pinMode(M1,OUTPUT); | |
pinMode(M2,OUTPUT); | |
pinMode(ENA,OUTPUT); | |
analogWrite(ENA,76);//speed of motor 0-255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define pin 2 | |
boolean value=0; | |
const int par=100; | |
void setup() { | |
pinMode(pin,INPUT); | |
Serial.begin(9600); | |
Serial.println("Sci-COPATH 1K Give Away counter"); | |
} | |
void loop() { |
NewerOlder