Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

reza RezaBidar

🎯
Focusing
Block or report user

Report or block RezaBidar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View baran_binary.cpp
#include<iostream>
#include<cmath>
using namespace std;
int decimal_binary(int n) /* Function to convert decimal to binary.*/
{
int rem, i = 1, binary = 0;
while (n != 0)
{
@RezaBidar
RezaBidar / student_input_validation.cpp
Last active Nov 17, 2015
write a program that get student information and validate inputs . if inputs was valid show success message otherwise show correct error message .
View student_input_validation.cpp
#include<iostream>
#include<string>
using namespace std;
bool isNameValid(string name){
int length = name.length(); // name.size() ; strlen(name.c_str);
if (length > 40 || length < 5)
return false;
else
@RezaBidar
RezaBidar / e_cal.cpp
Created Jun 28, 2015
for davood mirzaii
View e_cal.cpp
#include<iostream>
using namespace std ;
int fact(int x){
if(x == 0) return 1 ;
return x * fact(x-1);
}
int main(){
int n ;
@RezaBidar
RezaBidar / userinfo.c
Created Apr 27, 2015
gist for Davood Mirzaei ; run in dev c++ in C language
View userinfo.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int counter = 1 ;
char fname[50] , lname[50] , address[100] , shenasname[20];
float weight , height , w_sum = 0, h_sum = 0;
@RezaBidar
RezaBidar / various_problem.cpp
Last active Aug 29, 2015
ali moosaei c++ problems
View various_problem.cpp
#include<iostream>
#include<cmath>
using namespace std ;
double degreeToRadian(double d){
// 1 degree = 0.01745329252 radian ;
return d * 0.01745329252 ;
}
long moadele1(int x, int a, int b){
@RezaBidar
RezaBidar / factors.cpp
Last active Aug 29, 2015
find factors
View factors.cpp
#include<iostream>
using namespace std ;
int main(){
int a , n , j , tmay = 0 , tedad = 0 ;
cin >> a ;
for( n = 2 ; n <= a && a > 1; n++){
@RezaBidar
RezaBidar / a+b
Created Apr 3, 2015
simple acm solution
View a+b
#include<iostream>
using namespace std ;
int main(){
while(cin >> a >> b){
cout << a + b << endl ;
}
}
You can’t perform that action at this time.