Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Reuben Cabrera

@Reuben Cabrera
About
Posts
6
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • quine mccluskey method on C/C++
    R Reuben Cabrera

    ok. so the binary form is stored in the string. and the i will make a for loop that will count the number of 1's in the binary form of each entered minterms. my problems is how do I group together the minterms with the same number of 1's cause i need to compare 2 different groups later.

    C / C++ / MFC help c++ algorithms

  • quine mccluskey method on C/C++
    R Reuben Cabrera

    and quine mccluskey method would require grouping the minterms according to the # of 1's in their binary form. how do you do that? then printing the final output as wxyz w'x' etc.

    C / C++ / MFC help c++ algorithms

  • quine mccluskey method on C/C++
    R Reuben Cabrera

    #include<stdio.h>
    #include<stdlib.h>
    #include<conio.h>

    int convert(int);
    main()
    {
    int var,x,y,number,number2;
    int minterms[x],minterm[y];

    printf("=========QUINE MCCLUSKEY METHOD========");
    printf("\nHOW MANY VARIABLES DOES THE FUNCTION HAVE:?");
    scanf("%d",&var);

    printf("\nHOW MANY MINTERMS?:");
    scanf("%d",&number);
    number2=number;
    for(x=0;number2!=0;number2--)
    {
    printf("\nENTER MINTERM:");
    scanf("%d",&minterms[x]);
    x++;
    }

    //convert each minterm to there binary form//
    x=0;
    y=0;
    while(number!=0)
    {
    minterm[y]=convert(minterm[x]);
    x++;
    y++;
    }

    y=0;
    while(number!=0)
    {
    printf("\n %d",minterm[y]);
    number--;
    y++;
    }

    }

    int convert(int a)
    {
    int quot,binarynumber[100],i=1,sum=0;
    int multi;
    quot=a;
    while(quot!=0)
    {
    binarynumber[i++]=quot%2;
    quot= quot/2;
    if(i==1)
    {
    sum=sum + (binarynumber[i++] * 1);
    }
    else

    sum = sum + (binarynumber\[i++\] \* multiplier);
    }
    
    return sum;
    

    }

    C / C++ / MFC help c++ algorithms

  • quine mccluskey method on C/C++
    R Reuben Cabrera

    im already at converting the decimal # to binary. but the problem is the output should be like as a whole. i saw other programs converting decimal to binary and they just printed the remainder in reverse. my plan is to multiply the first digit to 10^0 then the next is by powers of 10 so when I add it i will have a whole number.

    C / C++ / MFC help c++ algorithms

  • quine mccluskey method on C/C++
    R Reuben Cabrera

    im not submitting someone else's code. i just need help. that's all.

    C / C++ / MFC help c++ algorithms

  • quine mccluskey method on C/C++
    R Reuben Cabrera

    hey guys, can I ask for help. can you guys help me with the algorithm/code for quine mccluskey method on C/C++. i kinda having trouble with the algorithm and I need to provide the code on Oct 9 for my CS class. please do help me with my machine problem :) thank you and God bless. :D

    C / C++ / MFC help c++ algorithms
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups